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

Simple Timepicker using Razor

5 Answers 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
gregor
Top achievements
Rank 1
gregor asked on 09 Mar 2011, 10:30 PM
Can someone help me with the timepicker, I cant get it to work at all.

I have this in my view, how do I show a timepicker with a min and max time of say 8am to 8pm ?

 

 

 

@(Html.Telerik().TimePicker()
.Name("TimePicker")  
.Min(new DateTime(2011, 3, 10, 8, 0, 0))  
.Max(new DateTime(2011, 12, 1, 18, 0, 0))  
.ShowButton(true)  
.Interval(15)
.Value(DateTime.Today))

Cheers
Gregor

 

 

5 Answers, 1 is accepted

Sort by
0
gregor
Top achievements
Rank 1
answered on 11 Mar 2011, 04:57 PM
Please ignore - I hadnt referenced the scripts properly - top note the best thing to do is create a blan kMVC telerik solutionm and then use this as a reference point for any existing project you want to add the Telerik MVC controls too.
0
Michael
Top achievements
Rank 1
answered on 11 Mar 2011, 09:32 PM
Is it possible to exclude the AM/PM from the timepicker ? (perhaps 24 Hr format)

To allow for simply inputting a time interval?
0
Atanas Korchev
Telerik team
answered on 14 Mar 2011, 07:44 AM
Hello Michael,

 You can use the Format setting to specify the accepted time format

Regards,
Atanas Korchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
tombal
Top achievements
Rank 1
answered on 28 Sep 2011, 08:05 AM
Hello,

Ok to change time format in the input but how can i change time format into the drop-down.

Is it possible to have time in drop-down from 00:00 to 23:59 ?

Thanks for your answer

Tom
0
Georgi Krustev
Telerik team
answered on 28 Sep 2011, 10:11 AM
Hello Tombal,

 
Check this forum thread devoted on the same matter.

All the best,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
General Discussions
Asked by
gregor
Top achievements
Rank 1
Answers by
gregor
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Atanas Korchev
Telerik team
tombal
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or