I've just upgraded several sites from 7.2.6 to 7.2.8. I've found that the datepicker now gives errors where I use it in uBlogsy for the Post Date for blog posts.
For existing items, the new datepicker fails to display the date previously entered (it's a mandatory field, so I am certain it was populated) and when I try to save & publish, I get an error message because the mandatory field is blank. When I use the new datepicker to enter a date, it displays a date in the field but still fails to save.
Any ideas what could be causing this or how to fix it?
For now, I've found that reverting to the umbraco.controllers.js from 7.2.6 gets things working again, but that seems to be a bit of a backwards step...
I've just installed uBlogsy in a 7.2.8 solution, created a new blog post and set the date. I can then save & publish it just fine.
I think you might have some browser caching going in. Please, please copy back the 7.2.8 umbraco.controllers.js (you are guaranteed to get other problems if you use a different version than what Umbraco shipped with).
Then make sure to change the version in ClientDependency.config and finally open a private/incognito browser window to make sure you have no cached files laying around that could be problematic.
If you still have trouble saving the date then make sure to copy the error in this post.
Hi Sebastiaan, I'm still having trouble with this - I've followed the steps you suggested, but uBlogsy posts are still not saving correctly.
When I create a new post, today's date and time is populated in the post date field. When I try to save it, I get an error. All it says is "Property has errors" in the red bar at the top of the screen and the Post Date field is flagged in red with the note "Invalid Date".
If I then go in to the date picker and re-select today's date and time manually, then save it, it works.
This is all in Firefox (normal and private window) after updating the version in ClientDependency.config
Hi David, thanks for that, but unfortunately the issue is still there in Firefox. It does seem to be related, so I wonder if there's anything else you've seen which could be causing this?
I can also confirm this bug. We are on v7.2.8 right now and if we save a previously published node that has a 'Date Picker with time' property, it will not save. It will give us a 'Property has errors' message even though the field is clearly showing a valid date and time in the textbox. In order to proceed, we have to clear out the time portion and re-enter it.
A little late to the party but we were having similar issues to this in Umbraco 7.3.4. We use a uk date format for the date picker data type.
Upon trying to publish a document with an existing date pre-populated we would receive the "Invalid Date" error.
The fix from 7.2.8 doesn't now seem valid in 7.3.4 and the controller code has changed.
We used the following code and this appears to have fixed the issue for our situation but we haven't yet tested the full scope of use for the date picker so can't guarantee it will resolve all issues (and indeed not introduce new issues)... however it's worth a try:
It looked like in the situation where a date was pre-populated when the document edit form was loaded, although some $scope values were being set it seems like something wasn't being set correctly which was causing the issue. So we added a call to the applyDate method in the controller passing the pre-populated date as a moment object. This mimics what happens when a date is selected using the UI and looks like it resolves the issue (but see the above disclaimer!). The commented out line is also called in applyDate and appears to be surplus.
Around Line 5177 (in our version) of /umbraco/js/umbraco.controllers.js you'll see
if ($scope.hasDatetimePickerValue) {
//assign value to plugin/picker
var dateVal = $scope.model.value ? moment($scope.model.value, $scope.model.config.format) : moment();
element.datetimepicker("setValue", dateVal);
comment this out -> //$scope.datetimePickerValue = moment($scope.model.value).format($scope.model.config.format);
add this -> applyDate({ date: moment($scope.model.value) });
}
Not meaning to hijack the thread... it just might be useful as I haven't seen this resolved yet in the issue tracker (but do often miss things!!!)
Datepicker broken in 7.2.8
I've just upgraded several sites from 7.2.6 to 7.2.8. I've found that the datepicker now gives errors where I use it in uBlogsy for the Post Date for blog posts.
For existing items, the new datepicker fails to display the date previously entered (it's a mandatory field, so I am certain it was populated) and when I try to save & publish, I get an error message because the mandatory field is blank. When I use the new datepicker to enter a date, it displays a date in the field but still fails to save.
Any ideas what could be causing this or how to fix it?
For now, I've found that reverting to the umbraco.controllers.js from 7.2.6 gets things working again, but that seems to be a bit of a backwards step...
Thanks,
Allan
I've just installed uBlogsy in a 7.2.8 solution, created a new blog post and set the date. I can then save & publish it just fine.
I think you might have some browser caching going in. Please, please copy back the 7.2.8
umbraco.controllers.js
(you are guaranteed to get other problems if you use a different version than what Umbraco shipped with).Then make sure to change the version in ClientDependency.config and finally open a private/incognito browser window to make sure you have no cached files laying around that could be problematic.
If you still have trouble saving the date then make sure to copy the error in this post.
Hi Sebastiaan, I'm still having trouble with this - I've followed the steps you suggested, but uBlogsy posts are still not saving correctly.
When I create a new post, today's date and time is populated in the post date field. When I try to save it, I get an error. All it says is "Property has errors" in the red bar at the top of the screen and the Post Date field is flagged in red with the note "Invalid Date".
If I then go in to the date picker and re-select today's date and time manually, then save it, it works.
This is all in Firefox (normal and private window) after updating the version in ClientDependency.config
It works ok in Chrome though...??
Any other ideas for how to fix this in Firefox?
Thanks, Allan
Just seen this: https://our.umbraco.org/projects/backoffice-extensions/u7-grid-data-type/questions-bugs-issues-feedback/70317-datepicker-not-populating-correctly-umbraco-728
Is this likely to be the same issue?
Did you try Our Hack to see if it fixes your issue?
David Dimmer - LinkedIn
Fyin.com, Umbraco Experts
Hi David, thanks for that, but unfortunately the issue is still there in Firefox. It does seem to be related, so I wonder if there's anything else you've seen which could be causing this?
Thanks, Allan
I can also confirm this bug. We are on v7.2.8 right now and if we save a previously published node that has a 'Date Picker with time' property, it will not save. It will give us a 'Property has errors' message even though the field is clearly showing a valid date and time in the textbox. In order to proceed, we have to clear out the time portion and re-enter it.
Possibly related
There's a fix for this issue now: http://issues.umbraco.org/issue/U4-6953
Hope that helps, Allan
The solution offered at : https://our.umbraco.org/projects/backoffice-extensions/u7-grid-data-type/questions-bugs-issues-feedback/70317-datepicker-not-populating-correctly-umbraco-728 worked for me.
A little late to the party but we were having similar issues to this in Umbraco 7.3.4. We use a uk date format for the date picker data type.
Upon trying to publish a document with an existing date pre-populated we would receive the "Invalid Date" error.
The fix from 7.2.8 doesn't now seem valid in 7.3.4 and the controller code has changed.
We used the following code and this appears to have fixed the issue for our situation but we haven't yet tested the full scope of use for the date picker so can't guarantee it will resolve all issues (and indeed not introduce new issues)... however it's worth a try:
It looked like in the situation where a date was pre-populated when the document edit form was loaded, although some $scope values were being set it seems like something wasn't being set correctly which was causing the issue. So we added a call to the applyDate method in the controller passing the pre-populated date as a moment object. This mimics what happens when a date is selected using the UI and looks like it resolves the issue (but see the above disclaimer!). The commented out line is also called in applyDate and appears to be surplus.
Around Line 5177 (in our version) of /umbraco/js/umbraco.controllers.js you'll see
Not meaning to hijack the thread... it just might be useful as I haven't seen this resolved yet in the issue tracker (but do often miss things!!!)
is working on a reply...