Welcome Guest Search | Active Topics | Sign In | Register

RequiredFieldValidator does not work with datepicker Options
sprocket
Posted: Wednesday, October 24, 2007 5:30:11 AM
Rank: Newbie
Groups: Member

Joined: 10/24/2007
Posts: 1
RequiredFieldValidator does not work when I set DisableTextBox="true" in datepicker.
If it`s set to false it`ll work fine.
eo_support
Posted: Wednesday, October 24, 2007 7:14:33 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

RequiredFieldValidator works with a text box. When DisabledtextBox = "true", there is no text box. So it won't work. You can validate it on the server side or add your own JavaScript code to validate it. Inside your own JavaScript code, you can do:

Code: JavaScript
if (eo_GetObject('DatePicker1').getSelectedDate() != null)
    //input is valid 
else
    //input is invalid


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.