Hi,
I have same requirement and everyting is working good using RadTimePicker control. But I when user enter 1 into Time Textbox that time it displaydate 1:00 AM. Insted of that I want 1:00 PM by default,
I want 1:00 PM when user enter 1 insted of 1:00 AM......upto........6 only
I try to do this but it is not working
void radTimePicker_ParseDateTimeValue(object sender, ParseDateTimeEventArgs args)
{
double Num;
string input = args.TextToParse.ToLower();
System.Globalization.
DateTimeFormatInfo formatInfo = new System.Globalization.DateTimeFormatInfo();
bool isNum = double.TryParse(input, out Num);
if (isNum)
{
if (Num >= 1 && Num <= 6)
{
radTimePicker.DisplayDate.Add(
new TimeSpan(12 + Convert.ToInt32(input)));
//radTimePicker.DisplayDate.AddHours(12 + Convert.ToInt32(input)));
//args.Result.Value.AddHours(12 + Convert.ToInt32(input));
}
}
}
Please reply me..........
Thanks,
Gaurang.