Skip to Content

UI5 TimePicker Inconsistent Functionality

According to the API reference the sap.m.TimePicker has a minutesStep property which should only enable the user to select certain minutes from the hour. For example setting minutesStep to "30" should allow you to select 9:00, 9:30, etc... (but not 09:47) In reality, however, this functionality doesn't do any validation on the manual input. Also if the current time is 8:15 the initial time shown in the TimePicker will be 8:15 so even if you selected 30 minute increments you are still able to select 00, 15 and 30 for the minutes value. This is also true for the secondsStep property which makes both of them useless.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 16, 2019 at 08:13 AM

    hi Alexander,

    As the documentation suggests, minuteSteps sets the values for the sliders only and does not have an impact on the TimePicker as such. It is mainly provided so that the user doesn't have to scroll too much when you know the time interval is going to be 15 mins, 30 mins etc.

    The validation has to be handled by the developer manually, if specificaaly required.

    Regarding the initial time, if you know your interval is always going to be 15, 30, 45 and 60....its better to set the time for minutes using custom code when the control is loaded so that you won't see an extra step in slider with current time. The behavior is because the Slider takes the control time as reference from the dateValue property.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.