Welcome Guest Search | Active Topics | Sign In | Register

Resetting the EODatePicker predefined format on loss of focus. Options
bskumar
Posted: Friday, October 30, 2009 4:59:54 AM
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.
eo_support
Posted: Friday, October 30, 2009 8:41:14 AM
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
bskumar
Posted: Friday, October 30, 2009 9:16:26 AM
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.
eo_support
Posted: Friday, October 30, 2009 9:20:45 AM
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
eo_support
Posted: Sunday, November 8, 2009 10:32:18 AM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.