I ran into this in a project upgraded from 7.1.x to 7.2.8. The problem is due to some Umbraco changes to their stock DatePicker that break the way DTG was using them. I believe this commit is the one that introduced the issue (https://github.com/umbraco/Umbraco-CMS/commit/43f99e11a5736c25fdc0f3aa89a4fc5169fe8dfa), but several others are at play too.
In this commit, they essentially introduced a "render model" and use that to store the "live" picked value, then when the page is saved (via formSubmitting event), they assign that value to $scope.model.value, which is what DTG is reading. The problem is that DTG also relies on the formSubmitting event, but DTG's is firing first, before the DatePicker has had a chance to assign to $scope.model.value, thus it sees an empty value. Even though you see the picked value in the textbox at first, DTG never actually knows about it since it's not on $scope.model.value yet. This worked before because the datepicker was bound directly to $scope.model.value.
Unfortunately there is no way to control the order of formSubmitting events, and in general it's not a reliable way to handle nested properties.
That being said, here is one hacky workaround that does fix the issue — But, I don't know what other problems it might introduce without spending some more time on this, so you'll definitely want to test. This is more to prove the issue and not meant to be a production fix.
The hack: /umbraco/Js/umbraco.controllers.js
After line 4849, add: $scope.model.value = $scope.datetimePickerValue;
Some ideas for a proper fix:
Update DTG to force formSubmitting events, similar to Archetype
Update DTG to read the DatePicker value differently, maybe by
accessing the render model instead or querying the textbox directly
Datepicker not populating correctly Umbraco 7.2.8
I ran into this in a project upgraded from 7.1.x to 7.2.8. The problem is due to some Umbraco changes to their stock DatePicker that break the way DTG was using them. I believe this commit is the one that introduced the issue (https://github.com/umbraco/Umbraco-CMS/commit/43f99e11a5736c25fdc0f3aa89a4fc5169fe8dfa), but several others are at play too.
In this commit, they essentially introduced a "render model" and use that to store the "live" picked value, then when the page is saved (via formSubmitting event), they assign that value to $scope.model.value, which is what DTG is reading. The problem is that DTG also relies on the formSubmitting event, but DTG's is firing first, before the DatePicker has had a chance to assign to $scope.model.value, thus it sees an empty value. Even though you see the picked value in the textbox at first, DTG never actually knows about it since it's not on $scope.model.value yet. This worked before because the datepicker was bound directly to $scope.model.value.
Unfortunately there is no way to control the order of formSubmitting events, and in general it's not a reliable way to handle nested properties.
That being said, here is one hacky workaround that does fix the issue — But, I don't know what other problems it might introduce without spending some more time on this, so you'll definitely want to test. This is more to prove the issue and not meant to be a production fix.
The hack: /umbraco/Js/umbraco.controllers.js After line 4849, add: $scope.model.value = $scope.datetimePickerValue;
Some ideas for a proper fix:
accessing the render model instead or querying the textbox directly
File: [root]/Umbraco/Js/umbraco.controllers.js
David Dimmer - LinkedIn
Fyin.com, Umbraco Experts
Our hack:
The hack: /umbraco/Js/umbraco.controllers.js
After line 4849, add:
$scope.model.value = $scope.datetimePickerValue;
It worked for me. Thank you very much.
I just need to increment clientDependency version in file config\ClientDependency.config
is working on a reply...