There is a "feature" of the datefield that I am trying to turn off. I don't want it to auto-format dates I put in. For example enter in "11" and it gets auto-formatted to the 11th of the current month. That's cool, but enter in "12345678" and it gets formatted to "01/03/5679" (Dec 34th doesn't exist so it goes 3 days further). Pretty nice, but this would be confusing to normal users. How do I turn it off? If you want to see it in action, the AJAX form demo does it.
I am having a hard time understanding why you would be typing "12345678" into a dateField. dateFields are meant to be used for dates, and entering in anything else would most certainly be confusing as it is abnormal user behavior.
Again, I fail to see what can be accomplished here.
Bad users will see a field and type whatever they want into it.
Good users will see that it is a date field and type a date into it.
You could write code until the end of time, but you are going to have a very difficult time creating a program that can tell the difference between "good" users and "bad" users. However you can help weed out the "bad" users by implementing validation.
DateField does have config properties for minDate and maxDate, as well as disabledDays and disabledDates, and of course support for custom validator functions...
I think that DatePicker has minDate and maxDate, but it seems that DateField doesn't have these. How can I use DatePicker methods or implement my own ?
Hi,
thanks for the answer, but I think you didn't understand my question. I was saying that the DateField class has no minDate property as such. So does this mean I have to go and extend DateField by adding a minDate property ? Or is there actually a way I can bypass this?