U4-7400 - datepicker after upgrade to 7.3.1 from 7.1.6 doesn't keep its persisted value up-to-date in real time

Created by Michael Falk 12 Nov 2015, 14:29:01 Updated by Shannon Deminick 05 Jan 2016, 19:32:24

Hi there

I have a property editor that consists of a datepicker and a contentpicker. In the prev. version i could set a Watch like this:

$scope.$watch('datepicker.value', function (newValue) { if (newValue) $scope.SaveToList(); });

Now in 7.3.1, that Watch is fired when i click save instead of when i select the date. Apparently it is too late to add to $scope.model.value here, since it saves nothing.

Please change this back so the Watch gets fired


Michael Falk 19 Nov 2015, 10:29:06

Now i tried the property editor in a clean install, and there it Works. So now the good question is what can cause the Watch nor to be fired?

Michael Falk 19 Nov 2015, 12:09:25

OK now it is not working in the satbdard anymore, but i think i know why. The dateTimePickerController in umbraco.controllers.js, is only setting the model.value on FormSubmitting. I think this is an error.

I think it should be set in the ApplyDate function too.

Further more i think the formSubmitting functions should use moments method to handle the format, instead of hardcoding it

Sam O'Connor 24 Nov 2015, 21:25:41

Fix submitted https://github.com/umbraco/Umbraco-CMS/pull/928 as per https://our.umbraco.org/projects/backoffice-extensions/u7-grid-data-type/questions-bugs-issues-feedback/70317-datepicker-not-populating-correctly-umbraco-728

Shannon Deminick 05 Jan 2016, 14:19:13


It is worth noting that no property editor is required to update it's value in real time - it is legal that a property editor updates it's saving value only when the form is submitted and only keeps it's display value updated in real time. I can apply this particular 'fix' for the date picker so that your watch value continues to work however applying a watch to any property editor value is not guaranteed to work.

Michael Falk 05 Jan 2016, 19:20:03

Hi Shannon Considering that it is possible to use the default property editors in our own controls, i think at least it should be an option. When making composite controls, we wil often need the value before Form Submitting

Shannon Deminick 05 Jan 2016, 19:32:24

@mf@visionpeople.dk It is beyond our control how property editors implement their logic, we cannot force this fact and there are other property editors in the core that only change their persistence model value on form submitting. This concept has been discussed at tremendous length with the guys that make archetype and nested content: https://github.com/leekelleher/umbraco-nested-content/issues/20

There are workarounds that you can use which both of these libraries utilize

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.8

Due in version: 7.3.5

Sprint: Sprint 6

Story Points: