This is a migrated thread and some comments may be shown as answers.

how to validate radtimepickers

5 Answers 83 Views
TimePicker
This is a migrated thread and some comments may be shown as answers.
sharat
Top achievements
Rank 1
sharat asked on 17 Jan 2011, 02:20 PM

I have two rad time pickers in 2nd and third columns of grid for starttime and endtime, with time interval of a 15mins,now i have to do 2 validation so that

1)for example  if we give 9:00 am in starttime to 9:30 am in endtime in a row then we cannot enter time intervals between them in another rows ,(or timeintervals between starttime and endtime should be disabled after saving or updating or should not be visible in timepicker anothertime) .

2)not only that the endtimepickervalue in Previous row should be  Starttime picker value in  nextrow .

how to achieve these, reply soon ,thanks in advance.

5 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 19 Jan 2011, 01:56 PM
Hi sharat,

You can create a view model with a Start/End time properties. When set you will update a property that will update the rest of the pickers stored in the grid with an appropriate value. Let us know if you when a particular example for this case.

All the best,
Kaloyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
sharat
Top achievements
Rank 1
answered on 21 Jan 2011, 08:33 AM
hi,
thanks for reply,  i am new to .net technologies and i am sorry that i dont understand what is view model is it a view model pattern ?actually iam using Radtime picker control and displays set of Times by  given time interval in its control without any database is there any adjustment or property in it for disabling the time intervals it is showing for if the time interval is alredy entered ,i am searching about that ,i request u to please send if there are any examples on this ,thanks for reply
0
Kaloyan
Telerik team
answered on 26 Jan 2011, 10:19 AM
Hello sharat,

Can you elaborate a bit more the exact scenario you want to achieve so i can create a small app with the exact functionality.

Greetings,
Kaloyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
sharat
Top achievements
Rank 1
answered on 27 Jan 2011, 01:36 PM

Hi Kaloyan,

thanks for response,I had a RadGrid with three columns PeriodName,PeriodStartTime,PeriodEndTime ,for PeriodStartTime and periodEndtime i had took Two RadTimePickers with Time Interval 15mins and Startime ="00:09:00" (9am) EndTime= "23:00:00"(11:00pm) each in design 
if we click radtimePicker in RadGrid a table will popup and shows timeperiods with 15mins intervals  starting from 9:00, 9:15,9:30,9:45,10;00..so on upto 11:00pm ,if in RadGrid in a row if we enter PeriodStartTime and PeriodEndTime as 9:00 am and 10:00 am respectively
then in nextrow in periodStarTime column in radtimepicker it should notshow the time periods  9:00,9:15,9:30 ,9:45 when clicked , since the time period or time slot is alredy choosen in previous row we have to make Disable/invisible alredy enteredtime periods in radtimepicker popuplist or we have to write a message that "alredy choosen timeperiod cannot be entered", Timeperiods should be entered only once. my problem is after entering 9:00am to 10:00am in firstrow  in radgrid  in nextrow if we give 9:15am to 9:45 it is taking that shouldnot be, actually in PeriodName column  we have "Interval" and "Lunch" for which we have to give timeduration as 15mins and 30mins respectively so we cannot put time interval in radtimepickers as 60mins its compulsion to take 15mins (for all other periods we have 60mins time duration)   

0
Kaloyan
Telerik team
answered on 01 Feb 2011, 09:26 AM
Hi sharat,

I can suggest you creating a list of TimeSpan that will include the start/end time intervals(from 9:00 to 23:00). Additionally you will have another collection of the same type, that will hold all of the selected times from the grid. A filter logic will happen after the second collection gets some values so the first collection of TimeSpan will remove the one presented in the second one.

Regards,
Kaloyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
TimePicker
Asked by
sharat
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
sharat
Top achievements
Rank 1
Share this question
or