9 Commits

Author SHA1 Message Date
Nick Holden
ef5ff031da
feat: add pickerUtc option to datetime widget (#3721)
I have a field that I would like to contain just a date (with no specific
time). When I configure the datetime widget with sensible options for
a date-only field, dates are stored properly in the saved markdown,
but when I load those dates in the UI, I see the date before.

This is happening because the DateTime component from the
react-datetime library uses local timezones. It loads the date as the
start of day UTC and then converts to the local timezone, which is
going to be the previous day in any timezone with a negative UTC offset,
including all of the Americas.

This change adds a pickerUtc option to the datetime widget so that users
can specify when they would like the datetime picker to display times in
UTC rather than in the local timezone. By setting this new option to
true on date-only fields, users can ensure that everyone sees the same
date in the picker regardless of local timezones.
2020-05-13 11:44:01 +03:00
Nick Holden
ebb4eb4e29
docs: remove reference to Date widget from DateTime widget (#3629) 2020-04-20 10:20:22 +03:00
adrian5
63ae92428a docs: update datetime widget description (#3063) 2020-01-12 11:30:27 +02:00
Björn Rixman
855efd848e feat(widget-date): add input display formatting (#1739) 2018-11-21 20:13:32 -05:00
Shawn Erquhart
6e453b3f08
docs: make widget docs editable (#1782)
* make widget docs editable

* update widget doc frontmatter keys

* improve docs preview

* fix formatting

* fix preview

* add prism highlighting for previews

* fix formatting

* restore cms branch
2018-10-01 20:00:57 -04:00
Caleb
ebc2471c6b
docs(fix): revert prettier formatting on markdown files (#1612)
Prettier formatting our markdown files is causing bugs because of the
differences between Gatsby's parser and Prettier's. Also, Prettier
formats the inline code-blocks containing example CMS configs, but the
formatting it uses doesn't really make much sense or match the suggested
CMS config style.

It doesn't actually make much sense to format the docs anyway, since we
use the CMS itself to edit/generate them.
2018-08-14 11:33:13 -06:00
Tony Alves
583377bc92 docs(fix): widget example code layout on Site (#1606)
* Fix widget example layout

* Stop running MarkDown through Prettier.
2018-08-14 08:37:07 -06:00
Caleb
f801b19221 chore: add code formatting and linting (#952) 2018-08-07 16:46:54 -04:00
Zeb Pykosz
04c44518b2 convert website from hugo to gatsby (#1369) 2018-07-25 07:47:26 -04:00