RangeValidator on date with 4 controll digits
Posted on 2009-02-22
I have am trying to do a range validator for a date with four controll digits. Is that possible?
It works fine if I just use the date and no control digits.
This is what I have on page load:
RangeValidator1.MaximumValue = DateTime.Today.ToString("yyyy/MM/dd");
But I need my date to be like this:
So I guess it doesnt work because of the 4 last digits. Is there away around this problem?
Also do I really have to write the minum value like this?
I would like the minimuValue to be like
but then I get a error message.
So what do I want?
I want a range validator to be able to go between 1850 to todays date.
I want my input in the text box to be like this
is there another way to check it? I just have to have between one date and today. Maybe code it into the application?