Comments (9)
I took a look at this using IE and Chrome on Windows and Chrome on Mac and all work correctly. I'm wondering if there's something going on with your browser/system locale. What is your primary language set to on your computer/browser?
from grommet.
It sounds like it might be a timezone issue.
from grommet.
Language is English, timezone is UTC+01:00. I changed also to German, makes no difference. A colleague here in Germany could observe the same, so it is not related only to my machine. Checked it on my machine with Chrome 43.0, Firefox 38.0, Opera 30.0, IE11 in combination with Win7. Also with Android 4.4.2 and Chrome (language in that case German). All show the same effect.
from grommet.
The effect can only be observed in one direction:
- change the day in the input field, call the datepicker and look to the calendar: the correct date is marked in green. In that direction it works.
- Other direction: call the datepicker, choose a date and close the calendar: the input field shows the day before the selected day.
There is a JS-warning: "ReferenceError: reference to undefined property this._resizeTimer" in index.js, line 40, col 8596.
from grommet.
Firebug output while executing like described before (case 2):
ReferenceError: reference to undefined property e.fromElement index.js:16:30404
ReferenceError: reference to undefined property r[e] index.js:2:19826
ReferenceError: reference to undefined property r._dispatchListeners index.js:16:22899
ReferenceError: reference to undefined property t[2] index.js:49:3775
ReferenceError: reference to undefined property t._owner index.js:1:19622
from grommet.
Eric, you're right! I changed the timezone to Pacific Time (UTC-08:00). And now it works ... !
from grommet.
The bug is caused by the method toISOString, which returns a string representation of a date having the timezone zero UTC offset, as denoted by the suffix "Z".
On the other hand, the calendar is populated with dates having the timezone of the user's machine.
That's why Tue Jul 07 2015 00:00:00 GMT+0300 becomes 2015-07-06T21:00:00.000Z.
I replaced date.toISOString().slice(0, 10) with moment(date).format('YYYY-MM-DD') and it works ok right now.
from grommet.
thanks @mirsilstan, would you mind submitting a PR with your fix?
from grommet.
Sure, no problem, I created the pull request #133.
from grommet.
Related Issues (20)
- Enhance DataTableColumns to disallow changing the order of some columns
- DataTable pin/sticky header behavior confined parent container when overflow is used
- DataTable: changing size of cells does not work in every situation HOT 1
- List: when provided only with primaryKey results in non-unique key error
- FormField triggers errors when it has null as a child
- DateInput Component Exceeding the Width of Screen as Page size is decreased
- enhancement: add support for granular styling of circle meter with onhover/click
- datatable column headers should honor align even when sortable, sort icon placement should adjust based on alignment
- FileInput - unable to use as controlled component; unable to reset input state externally
- Add `theme.anchor.icon.color`
- Data table selections should persist across DataViews
- Passing dynamic value to `step` prop in pagination no longer updates
- Drop - stretch="align" not working
- When using Data with Pagination a search event should return to page 1 of results
- Pagination endIndex fails to update if step is changed HOT 6
- Select & SelectMultiple - form with no placeholder accessibility
- Data not being updated correctly
- DataClearFilters type export missing
- Display of Select All button on search in the SelectMultiple component when limit is provided
- Misalignment in orderable list with >9 items HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grommet.