i am开发者_StackOverflow社区 using a calendar extender control in my asp.net web application. i want to disable this control while clicking on a check box. i used disabled property of calendar extender. i set disabled =true . but i have 2 problems.
it do not desabling the textbox associated with calendar extender control
i am using a regular expression validator to validate the date. if calendar extender is disabled then the regular expression validator always fails. (i assume the regular expression validator cant read the date when the calendar extender control is disabled)
i hope someone help me
- Instead of regular expression validator, use compare validator, set the operator to datatypecheck and datatype to date that will help
- Disable the textbox along with the calender
Hope this will help
Why not disabling the Textbox, the Validator(use CompareValidator with datatype=Date) and the Extender in the CheckedChanged Event handler of the Checkbox on serverside?
精彩评论