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

Now button is missing in DateTimePicker

Dear all, 

In asp.net mvc js1, the datetimepicker had a "now" button that was filling the current day and time .e.g. 01/01/2019 14:13

Is this option available in JS2 ? I can not find it, just the "Today" button, but it put 12:00 as an hour always, no matter if is 19:32

That option was very nice in my case as an "Start now" the task, and "End now" the task..

Thank you.

3 Replies

SI Silambarasan I Syncfusion Team March 14, 2019 07:45 AM

Hi Guillermo, 
Thank you for contacting Syncfusion support. 
We have looked into the reported query and your requirement (“Need to update the current date with current time value as like in EJ1 DateTimePicker”) can be achievable as a work around solution. In the that, we have updated the current date and time value in DateTimePicker input when clicking the “Today” button. Please refer the below code example. 
    function onOpen(args) { 
        this.footer.querySelector('.e-today').addEventListener('click', function () { 
            var dateTimeInstance = document.getElementById("datetimepicker").ej2_instances[0]; 
            dateTimeInstance.value = new Date(new Date().toLocaleString()); 
To know more about DateTimePicker, please refer the below UG documentation link.
Could you please check the above solution and get back to us if you require further assistance? 

MC Matt Cullinan August 2, 2022 10:03 AM

When using this solution change is triggered twice. Once to set the date and a second time setting the time. Is there a work around?

Code Example:


@(Html.EJS().DateTimePickerFor(model => model.DateField)
                                .Placeholder("Select date and time dropped")

function onOpen(args){

this.footer.querySelector('.e-today').addEventListener('click', function () {
        var thisInstance = this.inputElement.ej2_instances[0];
        thisInstance.value = new Date(new Date().toLocaleString());
function change(args){
     console.log("value: " + args.value)


value: Tue Aug 02 2022 00:00:00 GMT-0500

value: Tue Aug 02 2022 09:32:35 GMT-0500

UD UdhayaKumar Duraisamy Syncfusion Team August 3, 2022 10:53 AM

Hi Matt,

In DateTimePicker component the Change event will triggers for both Date and Time value get changed or either selected in calendar or time popup. This is the intended behavior of our component.


Udhaya Kumar D

Live Chat Icon For mobile
Up arrow icon