You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jim Pinkham <pi...@gmail.com> on 2012/02/03 20:58:32 UTC

DateTextField maxlength idea

I have a simple data entry form with a date/time field.

My end users (web newbies) have found another interesting way to confound
the most clear and straightforward instruction I can devise regarding it's
(obvious?) use.

I watched an end user type an entire time into the hour component without
tabbing over to the minute.

So, I'd like to suggest a minor change to
extensions.yui.calendar.DateTimeField.html to add the maxlength="2" to the
current size="2" on the hour/min input controls.

I think it might be a simple way to give earlier feedback  (I've found it
unwise to rely on instructions like "Please enter dates and times like
this..." ).

I know I could accomplish this for my own instances, perhaps with a copy of
this modified html in a spot higher in the classpath, or maybe an attribute
modifier someplace..., but then I thought what is the downside of making it
the default?   Sure, it would impact a lot of code, but unless some locale
I don't know of has 3 digit minutes, I don't think in a negative way --- I
was suprised to find no other similar past discussion; perhaps there is
some obvious reason this isn't a good idea?   I can't be the first one to
think of this, can I?

Cheers,
Jim

In case all that's not clear, here's what I mean in code:

MyPage.html
<span wicket:id="eventOn">MM/DD/YYYY [picker] HH MM [amPM]</span>

MyPage.java
add(new DateTimeField("eventOn"));

DateTimeField.html in wicket-datetime-1.5-RC5.1.jar
<wicket:panel xmlns:wicket="http://wicket.apache.org">
 <span style="white-space: nowrap;">
 <input type="text" wicket:id="date" size="12" />
 <input type="text" wicket:id="hours" size="2" *maxlength="2"* />
 <span wicket:id="hoursSeparator">&#160;:</span>
 <input type="text" wicket:id="minutes" size="2" *maxlength="2"* />
 <select wicket:id="amOrPmChoice"></select>
 </span>
</wicket:panel>

Re: DateTextField maxlength idea

Posted by Jim Pinkham <pi...@gmail.com>.
WICKET-4386 <https://issues.apache.org/jira/browse/WICKET-4386>
On Sat, Feb 4, 2012 at 5:27 AM, Martin Grigorov <mg...@apache.org>wrote:

> Ticket please :-)
>
> On Fri, Feb 3, 2012 at 9:58 PM, Jim Pinkham <pi...@gmail.com> wrote:
> > I have a simple data entry form with a date/time field.
> >
> > My end users (web newbies) have found another interesting way to confound
> > the most clear and straightforward instruction I can devise regarding
> it's
> > (obvious?) use.
> >
> > I watched an end user type an entire time into the hour component without
> > tabbing over to the minute.
> >
> > So, I'd like to suggest a minor change to
> > extensions.yui.calendar.DateTimeField.html to add the maxlength="2" to
> the
> > current size="2" on the hour/min input controls.
> >
> > I think it might be a simple way to give earlier feedback  (I've found it
> > unwise to rely on instructions like "Please enter dates and times like
> > this..." ).
> >
> > I know I could accomplish this for my own instances, perhaps with a copy
> of
> > this modified html in a spot higher in the classpath, or maybe an
> attribute
> > modifier someplace..., but then I thought what is the downside of making
> it
> > the default?   Sure, it would impact a lot of code, but unless some
> locale
> > I don't know of has 3 digit minutes, I don't think in a negative way ---
> I
> > was suprised to find no other similar past discussion; perhaps there is
> > some obvious reason this isn't a good idea?   I can't be the first one to
> > think of this, can I?
> >
> > Cheers,
> > Jim
> >
> > In case all that's not clear, here's what I mean in code:
> >
> > MyPage.html
> > <span wicket:id="eventOn">MM/DD/YYYY [picker] HH MM [amPM]</span>
> >
> > MyPage.java
> > add(new DateTimeField("eventOn"));
> >
> > DateTimeField.html in wicket-datetime-1.5-RC5.1.jar
> > <wicket:panel xmlns:wicket="http://wicket.apache.org">
> >  <span style="white-space: nowrap;">
> >  <input type="text" wicket:id="date" size="12" />
> >  <input type="text" wicket:id="hours" size="2" *maxlength="2"* />
> >  <span wicket:id="hoursSeparator">&#160;:</span>
> >  <input type="text" wicket:id="minutes" size="2" *maxlength="2"* />
>  >  <select wicket:id="amOrPmChoice"></select>
> >  </span>
> > </wicket:panel>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: DateTextField maxlength idea

Posted by Martin Grigorov <mg...@apache.org>.
Ticket please :-)

On Fri, Feb 3, 2012 at 9:58 PM, Jim Pinkham <pi...@gmail.com> wrote:
> I have a simple data entry form with a date/time field.
>
> My end users (web newbies) have found another interesting way to confound
> the most clear and straightforward instruction I can devise regarding it's
> (obvious?) use.
>
> I watched an end user type an entire time into the hour component without
> tabbing over to the minute.
>
> So, I'd like to suggest a minor change to
> extensions.yui.calendar.DateTimeField.html to add the maxlength="2" to the
> current size="2" on the hour/min input controls.
>
> I think it might be a simple way to give earlier feedback  (I've found it
> unwise to rely on instructions like "Please enter dates and times like
> this..." ).
>
> I know I could accomplish this for my own instances, perhaps with a copy of
> this modified html in a spot higher in the classpath, or maybe an attribute
> modifier someplace..., but then I thought what is the downside of making it
> the default?   Sure, it would impact a lot of code, but unless some locale
> I don't know of has 3 digit minutes, I don't think in a negative way --- I
> was suprised to find no other similar past discussion; perhaps there is
> some obvious reason this isn't a good idea?   I can't be the first one to
> think of this, can I?
>
> Cheers,
> Jim
>
> In case all that's not clear, here's what I mean in code:
>
> MyPage.html
> <span wicket:id="eventOn">MM/DD/YYYY [picker] HH MM [amPM]</span>
>
> MyPage.java
> add(new DateTimeField("eventOn"));
>
> DateTimeField.html in wicket-datetime-1.5-RC5.1.jar
> <wicket:panel xmlns:wicket="http://wicket.apache.org">
>  <span style="white-space: nowrap;">
>  <input type="text" wicket:id="date" size="12" />
>  <input type="text" wicket:id="hours" size="2" *maxlength="2"* />
>  <span wicket:id="hoursSeparator">&#160;:</span>
>  <input type="text" wicket:id="minutes" size="2" *maxlength="2"* />
>  <select wicket:id="amOrPmChoice"></select>
>  </span>
> </wicket:panel>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org