We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to customize the popup content ?

I have defined in my view a TimePicker with the following code:

 @Html.EJ().TimePickerFor(model => model.WorkingTime).CssClass("customCss").TimeFormat("H:mm:ss").Locale("it-IT").HourInterval(1).MinutesInterval(1).SecondsInterval(10)

I'd like in the popup the values are enumerated ten seconds per ten seconds, but, instead, the list is populated 30 minutes per 30 minutes.
Is there a way to populate 10 seconds per 10 seconds, or, at least 1 minute per 1 minute ?

Thank you.

4 Replies

PO Prince Oliver Syncfusion Team April 29, 2019 10:26 AM UTC

Hello Silvio,  
 
Thank you for contacting us. 
 
We have checked the reported issue in our end. The properties “HourInterval”, “MinutesInterval”, “SecondsInterval” represents the interval to be changed in the Timepicker’s input value based on arrow or mouse navigation on input and this will not affect the time interval inside popup. To populate the popup content with certain interval, we suggest you use “interval” property. Please refer to the below UG link.https://help.syncfusion.com/api/js/ejtimepicker#members:interval  
 
Setting the interval value to “0.17” will generate time with 10 seconds interval. Since the type of “Interval” property in MVC is int , we suggest you set this property through create event. Kindly refer to the following code snippet. 
 
   <div class="control">     @Html.EJ().TimePickerFor(model=>model.WorkingTime).CssClass("customCss").TimeFormat("H:mm:ss").HourInterval(1).MinutesInterval(1).SecondsInterval(10).ClientSideEvents(e=>e.Create("onCreate")) 
    </div> 
    </div> 
    <script> 
        function onCreate(args) 
        { 
        this.setModel({interval: 0.17 }) 
        } 
 
    </script> 
 
We have considered “Unable to set decimal values as time interval in MVC”  as a defect in our end and we will modify this such that users can mention decimal values directly through Razor code. This fix will be included in our upcoming NuGet release expected on first week of May 2019. You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link: https://www.syncfusion.com/feedback/6062/   
 
Note: Setting very less interval value needs to generate more li elements and there may be some time delay during popup open due to this “li” generation.  
 
Regards, 
Prince 



PO Prince Oliver Syncfusion Team May 15, 2019 04:51 AM UTC

Hi Silvio, 

We are glad to announce that our Essential Studio Volume 1 service pack, 2019 release (v17.1.0.47) is rolled out and is available for download under the following link. 


Now the interval can be given through Razor code as shown below 

@Html.EJ().TimePicker("WorkingTime").CssClass("customCss").TimeFormat("H:mm:ss").Locale("it-IT").HourInterval(1).MinutesInterval(1).SecondsInterval(10).Interval(0.17F) 

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 

Regards, 
Prince 



SI Silvio May 15, 2019 06:45 AM UTC

Thank you !


PO Prince Oliver Syncfusion Team May 15, 2019 06:52 AM UTC

Hi Silvio, 

Most welcome. We are glad to help you.  

Regards, 
Prince 


Loader.
Live Chat Icon For mobile
Up arrow icon