open time picker

I am using the openOnFocus to open the date picker and that works great. Is there a way to

open the time picker when somebody clicks a date


3 Replies

SP Sureshkumar P Syncfusion Team January 20, 2023 09:04 AM UTC

Hi Chris,

We understand the importance of resolving your issue as quickly as possible. To assist us in providing an accurate solution, please provide more details about your exact requirement, such as a video or image representation. This will allow us to better understand your needs and provide a solution that meets them.

Regards,

Sureshkumar P



CL Chris Loelke January 24, 2023 05:08 PM UTC

User Clicks into the input box

Picture1.png

Date picker opens – already using the openOnFocus to do this

Picture2.png

User Clicks a date

Picture3.png

Without the user clicking the clock I would like the time picker to open.

I can capture the event and check for a date using target but have no way to open the time picker




SP Sureshkumar P Syncfusion Team January 25, 2023 10:51 AM UTC

Chris, you can achieve your requirement by set the parameter as “time” to call the show method.

Find the code example here:

let dateTimeInstanceDateTimePicker = new DateTimePicker({

  placeholder: 'Select a date and time',

  focus: function () {

    dateTimeInstance.show('time');

  },

});

dateTimeInstance.appendTo('#datetimepicker');

 

 


Find the sample here: https://stackblitz.com/edit/jadzsh?file=index.html,index.ts


Loader.
Up arrow icon