Rank: Newbie Groups: Member
Joined: 2/21/2009 Posts: 4
|
Hi,
I want to let users select a delivery date using the DatePicker, and have set weekends and local holidays as disabled dates.
This works fine in the calender (user cannot select disbaled dates) - but user is still able to select these days manually in the textbox control!
How do I (client-side) prevent users from submitting the page having selected a disabled date? Furthermore no validation group property is available on the DatePicker control - shouldn't there be such a property, letting the control be validated the "standard" way??
Thanks...
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The DatePicker supports standard validators, however it does not support validation group. It makes perfect sense to have it though. We will look into it and see if we can add that.
As to disabled date, we decided not to have it built-in on the textbox to avoid user confusion and also give developers more flexibility on how to handle this situation. On the Calendar part, user can see a date is disabled, so it’s quite straight forward when user can not click it. However when the directly type in a date in the textbox, there is no unified way of notifying user that the date is invalid. Some users may want the textbox to auto-correct itself, but other user may find it very confusing because they do not know that date is disabled when they type it in. Other users want to show a message box to prompt the user; Some other users may want to disable a standard validation failed messages. Obviously there is not a single solution that can satisfy all of them. Thus we choose to leave this part to the developer.
It would also make sense to have a client side API to check whether a given date is disabled. We will also look into that and see that can be added.
Thanks!
|