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

change event for ej-datetimepicker

– we’ve got the ng-blur and the control has e-change which happens when the date/time picker control is opened and a new date/time selected
But what about when the user just types inside the text box without opening the control?
How can we tell that the date/time has changed while the user is still typing into the box?

1 Reply

FP Francis Paul Antony Raj Syncfusion Team October 25, 2016 02:20 PM UTC

Hi Sarah, 
 
Thanks for contacting Syncfusion support. 
 
We would like to let you know that ‘change’ event in Date/Time Picker control will be triggered in the following cases. 
 
#1) when select the Date/Time value from popup. 
#2) FocusOut occurs after a valid date value typed into Date/Time Picker textbox. 
 
So you can achieve your requirement (“trigger change event after typing the date/time value in textbox”) as per the below code example. 
 
[html] 
<input type="text" id="dateTime" ej-datetimepicker e-value='value' e-change='onChange' /> 
[script] 
 
        angular.module('DateTimeCtrl', ['ejangular']) 
           .controller('DateTimePickerCtrl', function ($scope) { 
               $scope.value = "5/18/2016 2:47 AM"; 
               $scope.onChange = function(e) { 
                alert("Change Event Triggered with " + e.value); 
               } 
           }); 
 
Kindly get back to us if you need any further assistance. 
 
Regards, 
Francis Paul A 


Loader.
Up arrow icon