|
Rank: Member Groups: Member
Joined: 9/22/2009 Posts: 24
|
Hi, If user entered invalid format or empty, How to reset the EODatePicker predefined format on loss of focus from client side. Thanks in advance, Kumar.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Unfortunately I don't think there is an easy way to do it. I don't think it's a good idea anyway because most users will be upset when you wipe out their input on lost focus even though they are not done yet.
Thanks
|
|
Rank: Member Groups: Member
Joined: 9/22/2009 Posts: 24
|
Hi,
Ok, But when user clears data from text box. On loss of focus, I want to reset the textbox masking. Is there any way to do this.
Thanks, Kumar.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
No. You can set PickerHint to any text. It will be displayed once. Once user starts typing, even though they later cleared their input, you won't see it again. It makes sense to automatically display PickerHint again once user clears their input though, so we will see what we can do.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have enhanced the DatePicker control to support this. The enhancements include:
1. Automatically displays PickerHint when user clears the date. Previously PickerHint is only displayed when the DatePicker is initially empty and once user starts typing, PickerHint won't be displayed again. Now if user starts typing and then clears the DatePicker again, the PickerHint is displayed again;
2. Added ClientSideOnFocus and ClientSideOnBlur event handler. You can handle these two events to perform whatever additional logic you wish to perform. For example, you can handle the OnBlur event to check whether user has entered a full date, if user has not entered a complete date (by checking whether getSelectedDate() gives you a null value), you can reset the DatePicker (call setSelectedDate(null) on the DatePicker) to reset the DatePicker, which causes PickerHint to be displayed again. Please keep in mind that OnFocus and OnBlur is called when the control loses/receives focus, it is also called when the browser window loses/receives focus.
Please let us know if you would like to try the new build with these two features.
Thanks!
|
|