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

Keep time format when typing in the timepicker input field

Hi,

I am using the ejs.calendars.TimePicker component with the following properties:

     value: new Date('1/1/2018 08:00'),
     format: 'HH:mm',
     step: 15,
     change: calculateTotalHours,
     width: '50%'

It is possible to type in different values (for example: 999999) while this is not possible in the TimePicker in the ASP.NET Core example. You can only type in valid values. I want to stop the user from typing in wrong values and automatically add the ":" as I was using an input mask. I tried setting the type of the input field to type="time", but then the styling is messed up and Firefox adds a "clear" button. The left timepicker has this type="time", the right doesn't, but the user can add everything when typing.


Is it possible to only allow "time"-values when typing in the timepicker?

Thanks!

1 Reply

SP Sureshkumar P Syncfusion Team October 16, 2019 11:16 AM UTC

Hi Pieter, 

Greetings from Syncfusion support. 

We have already considered to provide mask support for the TimePicker component at our end and this support will be included in any one of our upcoming releases. We will implement the feature based on the customer request count and priority.  

You can track the status of the requested requirement from the below feedback link. 


Also, if you are facing any issues from your end please share the issue reproducing sample that will help us to check and procced further. 

Regards, 
Sureshkumar P 


Loader.
Live Chat Icon For mobile
Up arrow icon