How Set Default Value Time Picker

Hello,

I'm newbie here, is any other examples here  to set default value for time picker value, i want time picker value for first form load always 12:00 am,
 
i'm trying with this code : 

  @Html.EJS().TimePicker("GSPLTime").Value("12:00 AM").Render()

is not working







3 Replies

DL Deepa Loganathan Syncfusion Team October 1, 2018 07:32 AM UTC

Hi Rishal,  
 
Thanks for contacting Syncfusion Support.  
 
By default, the value property of TimePicker component will accept the DateTime as Object or String as value for it and it would be parsed and maintained as DateTime object, internally. So please use the date and time string (For ex: "1/1/2019 12:00 AM") as the value for TimePicker component. Please, find the code snippet to meet your requirement below.  
 
[TimePicker.cshtml]  
  
@Html.EJS().TimePicker("GSPLTime").Value("1/1/2019 12:00 AM").Render()  
  
Also, refer to following links to know more about TimePicker component in ASP.NET MVC.  
 
  
  
Please, let us know if you need any further assistance.  
 
Regards,  
Deepa L. 
 



RI Rishal October 1, 2018 07:39 AM UTC

Thank you so much again...


DL Deepa Loganathan Syncfusion Team October 1, 2018 09:02 AM UTC

Hi Rishal, 
Most welcome. Please let us know if you have any further queries. 
Regards,  
Deepa L. 


Loader.
Up arrow icon