Is there a way to validate date entered by a user in Gridview without converting to Templatefield?
Posted on 2014-12-28
Hi, I'm using VS2012.
Is there a way to validate user's date input in the gridview (it's the last column). There 6 columns, the first is the Edit(auto generated) and the last one is date time type with display format to show only short date. The grid is datagind, Is there a way to validate when user modify the date/time column, only date is modified, when they click the Update button?
The problem is if I convert it to Template field then I lose the ability to format the dispaly to only short date, it would display the entire date and time. It's okay if I can find a regular expression that does the job but i can't find one that would validate mm/dd/yyyy hh:mm:ss AM/PM.