Reputation: 1
My problem is the following : On my website, I use the Jquery-ui datepicker to allow my visitor to enter a date. I have configured the datepicker such users can modify the month and the year. However, I have noticed that they never enter the year : they leave in the default value. In my mind, they don't see that they can edit the year value...
So, I would like to intialize the default year value to empty/blank and show an error alert if the user has not modified it.
I try to do that, but in vain.... So how can I do that ?
Maybe, there is an other way to force my users to select a correct year value. Have you got any suggestions ?
In advance, thanks for your answer.
Upvotes: 0
Views: 388
Reputation: 4577
You could identify what the default value is and then, in your onSelect callback you could see if the current year value is different than what the original was and execute whatever code seems appropriate.
Upvotes: 0
Reputation: 1
I thought a little bit and I think what I would do is not possible... How could the datpicker calculate the days of the month if the year is not specified?
So, Have you got any suggestions to force my users to change the year default value ?
Upvotes: 0