Ajax Control Tookit - Masked Edit - UK Style Dates

B

Bob

I am having enormous problems with this. I can get the input validation
running, after a lot of fiddling around but when I try to assign to the
textbox in code the problems start.


I can assign a string OK

StartDateText.Text = "31/08/2008 18:06:21";

Or

string startingDate = string.Format(@"{0:d}/{1:d}/{2:d}
{3:d}:{4:d}:{5:d}", tempDateTime.Day, tempDateTime.Month,
tempDateTime.Year, tempDateTime.Hour, tempDateTime.Minute,
tempDateTime.Second);
StartDateText.Text = startingDate;

These display OK.

StartDateText.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

gives garbage.

But any of these examples causes the control to go haywire when an invalid
date is entered and then corrected. The invalid date is reported OK but then
the corrected date is still reported invalid.

Can this extender really only be used one way or with US dates?

Bob
 

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
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top