rangevalidator date problem

G

Guest

Hi,

I am writing a page that contains a texbox, a calendar, and a
rangevalidator. The range validator is testing the textbox for date values.
There is an event, set up to fire, when the calendar's date has been changed,
and in the event body, i am using the calendar's function to transform the
date to string.

gasday.Text = Calendar1.SelectedDate.ToShortDateString();

In the page header, there is a culture setting:
<%@ Page Culture="hu-HU" Lang.....

My problem is, that if i click the calendar, the selected date is appearing
in the textbox, but the range validator is showing it's error message,
becouse the date is not in the right format.

Examples of dates:
date produced by the calendar: "2005.05.13." (this is the good date in
hungarian spelling)
correct date: "2005.05.13" (that's ok for the rangevalidator control)

It looks like the control's validation is'nt following the culture setting
in the header.

What do i wrong?

Thanks,
Arpicheck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top