How can I open the TimePicker on the Datetimepicker?

I am using 'ejs-datetimepicker' in Angular. How can I open the TimePicker on the calendar? I can open the calendar with the 'show()' method on a click. Is there a similar way to keep the timepicker open


2 Replies 1 reply marked as answer

UD UdhayaKumar Duraisamy Syncfusion Team October 2, 2022 01:42 PM UTC

Hi Amarender,


We are validating the requirement. We will update the further details in one business day (3rd October 2022).


Regards,

Udhaya Kumar D



UD UdhayaKumar Duraisamy Syncfusion Team October 3, 2022 08:13 AM UTC

Hi Amarender,


To open the time picker popup, we suggest you pass the type as “time” in the show method. Please refer to the below code snippet and sample for more details.


<div class="control-section">

  <button (click)="datePopup()">DatePicker Popup</button>

  <button (click)="timePopup()">TimePicker Popup</button>

  <div id="control_wrapper">

    <ejs-datetimepicker #sample></ejs-datetimepicker>

  </div>

</div>

  datePopup() {

    this.dtpObj.show('date');

  }

  timePopup() {

    this.dtpObj.show('time');

  }


Sample : https://stackblitz.com/edit/angular-2k9anz?file=app.component.html,app.component.ts


Kindly try the above suggestion and let us know if this meets your requirement.


Regards,

Udhaya Kumar D


Marked as answer
Loader.
Up arrow icon