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.
Unfortunately, activation email could not send to your email. Please try again.

change event for ej-datetimepicker

Thread ID:

Created:

Updated:

Platform:

Replies:

127071 Oct 24,2016 09:32 AM Oct 25,2016 10:20 AM JavaScript 1
loading
Tags: ejDateTimePicker
Sarah Roper
Asked On October 24, 2016 09:32 AM

– 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?

Francis Paul Antony Raj [Syncfusion]
Replied On October 25, 2016 10:20 AM

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;