Declined
Last Updated: 14 Sep 2018 20:06 by ADMIN
sitefinitysteve
Created on: 22 Nov 2013 15:28
Category: Kendo UI for jQuery
Type: Feature Request
6
Date\Time Picker non-date values should trigger "Change" Event
Non-date values don't trigger change events...so I can't remove\fix non-date values

If you're gonna do that, then please at least make it so it ONLY accepts dates, like wipe the text if some non-date value is in there.

What you're doing to me is making me need to write my own blur\change for every date picker I use...ever...in anything


REF: http://www.kendoui.com/forums/kendo-ui-web/date-time-pickers/change-event-bug.aspx#GYb05l5uvUG-Bq_duYcF8Q
12 comments
Jesse
Posted on: 14 Sep 2018 20:08
Semi-work-around. If you're using jQuery validate, you can add date validation to the field. If you're using asp.net mvc unobtrusive validation that should be included by default when using the Kendo HTML helpers for a DateTime property, or you could add data-val-date="Must be a date" attribute to the input. I say semi-work-around because you can still type in a date in a valid format that is an invalid date (such as a date that falls on a disabled date on the calendar) and the change event doesn't fire - which is what led me here. Now the validation succeeds because the input has a valid date, but the widget's value is null because it's an invalid date. The kendo validators might take care of this but using those is a whole 'nother chore.
Robert
Posted on: 15 May 2015 21:30
Brandon; your unkind response is one of the reasons we stopped using Kendo; not very community-friendly, especially given the number of comments.   I've been using KendoUI for years now on one app; this type of thing has often made me wish we never did.    

You could at least add a non-breaking option to allow users to enable a strict-date entry mode w/out making them wire their own.   I'd be impressed if you responded.  
iConect Developer - Mike
Posted on: 23 Apr 2015 18:29
I agree that it would be ideal if the datepicker fired the change event under the scenarios mentioned by Troy below.
Troy
Posted on: 09 Mar 2014 01:26
The change event doesn't fire under a few scenarios...invalid data being changed to invalid data, empty value being changed to invalid data, etc. Here is a table I came up with while trying to work around the shortcoming Steve described: 

https://gist.github.com/fourlincoln10/9441148
Kyle
Posted on: 03 Mar 2014 20:48
@Steve, nice repro steps!  Much better than mine.
sitefinitysteve
Posted on: 03 Mar 2014 19:23
@Brandon ...is there a bug? http://jsbin.com/fewikobi/4/
ADMIN
Brandon
Posted on: 03 Mar 2014 17:11
works as described
ADMIN
Brandon
Posted on: 03 Mar 2014 16:44
Hey folks, if you check out this link (http://jsbin.com/fewikobi/2/edit) you'll notice that the D\TPicker does indeed fire a change event, even when invalid value are entered. Please let me know if this is not the issue you are seeing.
sitefinitysteve
Posted on: 28 Feb 2014 15:31
...at the very very VERY least add a readonly config option so it doesn't have to be set after the fact.
Kyle
Posted on: 16 Dec 2013 20:29
I'm with you 100%, Steve.  Since I'm using the Kendo UI for my website, I'd hope the controls would work so that I wouldn't have to go get the jQuery UI DatePicker.

Nulling out the field should fire the change event.  It should also not accept invalid input.
sitefinitysteve
Posted on: 29 Nov 2013 19:37
http://jqueryui.com/datepicker/

Notice how the jQueryUI date picker (while ugly), doesn't accept random text?
sitefinitysteve
Posted on: 22 Nov 2013 15:30
...this should be a bug, date\time picker should enforce the date\time...at least as a property to enable