asp.net rangevalidator for calendar extender entries gives problems in safari
- by Robin Baralla
Hi there,
I have the following scenario:
arrival and departure dates have to be selected on a form, through 2 textboxes with a calendar extender each.
I validate the entries to check that no date before today is selected and to check that the departure is after the arrival. I used a rangevalidator and a comparevalidator.
In IE, Firefox and Opera it is working fine, in Safari (on windows) however both the validators go off even on entries that should be accepted.
It makes me suspect that the date format dd/MM/yyyy causes trouble for Safari.
(the dd/MMMM/yyyy also gave the same troubles in the other browsers, probably due to the dependency on UIculture)
The code is:
The range validator gets its values in code behind on Page_load
RangeValidator1.MinimumValue = DateTime.Now.AddDays(1).ToShortDateString();
RangeValidator1.MaximumValue = DateTime.Now.AddMonths(12).ToShortDateString();
Does anybody have any suggestions on how to solve this problem with safari?
best regards, Robin