Categories > TinyButStrong general >

how to check datetime invalidate

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: thuc101
Date: 2007-02-10
Time: 08:13

how to check datetime invalidate

How can I check the format of datetime in a textbox? help me???
By: Skrol29
Date: 2007-02-10
Time: 15:56

Re: how to check datetime invalidate

Hello,

Could you give more details about your problem ?
By: TomH
Date: 2007-02-10
Time: 16:56

Re: how to check datetime invalidate

IMNSHO -- for a user input screen you should be kind and gentle to the user and the way to cause least confusion (esp between euro and usa users) is to just code in the standard DDLBs, one for each parameter ((sorry, that is Drop Down List Box)) that way you will always get exactly the input you expect and the input "value" can be whatever you want for preparing the query input while the user see a more user friendly label
<select>
<option value="none>--select month--</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
...
</select>

my 2 cents
By: sheepy
Date: 2007-02-11
Time: 06:52

Re: how to check datetime invalidate

When I am in a hurry, I sometimes put a label that explains the date format and do no validation (other then escaping).  Since I'm using MySQL, if they type it wrong, the date will be filled with default value (0000-00-00 or whatever).  The user(s) learn pretty fast.  Not a nice approach, since users tend to blame themselves, however it works surprisingly well.

In other cases I used javascript calendar with hidden date field.  No more format headache.