editionView() returns date decremented by 1 day
See original GitHub issueDescription
In my index.js:
project.editionView().fields([
nga.field('devdate', 'date')
.format('MM-dd-yyyy')
.label('Development Date'),
]);
The day (dd) is decremented by 1 but the above works fine (displays the correct devdate
response) in project.creationView().fields
.
Steps to Reproduce
Plunkr: http://plnkr.co/edit/M70PbzPLBCGVZ9dollvj?p=preview
- Set the browser to CST or any timezone less than GMT
- Select ‘Projects’ in the left hand pane
- Select ‘Id’ of any of the projects in the Project List; notice the ‘Dev Date’
- Now in the Edit Project form, the ‘Development Date’ displays decremented by 1 day
- If user chooses to save, the ‘Dev Date’ will be stored in the db incorrectly.
I’ve tried it with and without the .format
and .label
with the same results. Again, creationView works just fine. And the datepicker requests with the devdate:"2016-12-08"
so it is stored in the database accurately.
Expected behavior: Display 12-07-2016
Actual behavior: Displays 12-06-2016
Issue Analytics
- State:
- Created 7 years ago
- Comments:31 (14 by maintainers)
Top Results From Across the Web
datepicker date off by one day - Stack Overflow
My project is having the same issue where depending on the syntax of my date input, the date returns as input or off...
Read more >Datepicker returns minus 1 day - Power Platform Community
The date returned to the server from a DatePicker control is consistently one day less than the date entered. So enter, say, April...
Read more >Options - Tempus Dominus - Bootstrap 4
Returns the component's model current date, a moment object or null if not set. ... moment by passing one of the following strings...
Read more >JS Datetime bug — auto set back one day | by Fred Wong
I came across this bug about the JavaScript Datetime object. The application set the date to 2019–01–31to the database but when I tried...
Read more >Date Picker Return Wrong Date - ServiceNow Community
I realized one thing when I'm working on Business Rule and Script Include ... I understand that GlideDateTime() would return me the UTC ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m experiencing a similar problem with my Datepicker field, the value field is inconsistent with what I selected. I selected January 1, 2015, the field value changed to June 21, 2015. I’m also getting “Error: 10 $digest() iterations reached.” in my console log. The later error could be my app specific.
I pinpointed the error down to these codes. My $digest error disappeared when I commented out the $watch statement.
The solution that I came up with is to unregister $watch() instead of return inside the IF conditions. Replace the above statement with these codes.
@wannarka @Phocea @Kmaschta @fzaninotto Can you please confirm the fixed and merge it to master? It is a critical bug.
hi @Phocea , I’m experiencing with DateField infinite watches loop in EditionView (
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations:
), my using version is 1.0.6. Any progress to get this problem resolved. We tried applying the fix that @thachp recommended above, and it works. Could you please let me know how to get the progress on and completed quickly?