-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datetime formats #4539
base: master
Are you sure you want to change the base?
Datetime formats #4539
Commits on Dec 29, 2017
-
Partial Fix: Field type 'Datetime' - format customization missing key…
…stonejs#3160 Properties in DatetimeType were not being carried through to DatetimeField. Now resolved. format property replaced by dateFormat and timeFormat properties. Requires properly set parseFormat property (inclusing time zone format (Z) to function correctly. We should be able to calculate this based on the dateFormat and timeFormat properties and pass through form the Type to the Field.
Configuration menu - View commit details
-
Copy full SHA for f4f2e20 - Browse repository at this point
Copy the full SHA f4f2e20View commit details
Commits on Dec 30, 2017
-
In DatetimeType, add tzFormat option to control timezone format strin…
…g instead of hardcoding in DatetimeField. Updated validation for options to reflect change from format to dateFormat, timeFormat and tzFormat.
Configuration menu - View commit details
-
Copy full SHA for e488b47 - Browse repository at this point
Copy the full SHA e488b47View commit details -
In DatetimeType, automatically calculate a parseFormat to suit the
dateFormat, timeFormat and tzFormat specified. This removes the requirement for a parseFormat option to be specified. The parseFormat option is still available, and if supplied is appended along with the calculated format to the default list.
Configuration menu - View commit details
-
Copy full SHA for 8d49628 - Browse repository at this point
Copy the full SHA 8d49628View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57f8b2a - Browse repository at this point
Copy the full SHA 57f8b2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e9fed8 - Browse repository at this point
Copy the full SHA 9e9fed8View commit details -
FIX: Field type 'Datetime' - format customization missing keystonejs#…
…3160 Placeholder for time field now displays correct format.
Configuration menu - View commit details
-
Copy full SHA for 8f36861 - Browse repository at this point
Copy the full SHA 8f36861View commit details
Commits on Dec 31, 2017
-
Clone parseFormats array in DatetimeType. Failing to do so results in
the same array being shared by all Datetime field instances. Fixed test 'should throw when format is not a string'. Now fails if exception is not thrown, rather than timing out.
Configuration menu - View commit details
-
Copy full SHA for b1efb93 - Browse repository at this point
Copy the full SHA b1efb93View commit details -
Updated Datetime tests to reflect change of format to dateFormat,
timeFormat and tzFormat.
Configuration menu - View commit details
-
Copy full SHA for f6b1890 - Browse repository at this point
Copy the full SHA f6b1890View commit details -
Added test to cover validation of a custom display format.
Altered test for validation of the default format when a parseFormat is specified. Previously, if a parseFormat is specified, this became the only acceptable format, even if a different display format is defined. If the display format differs from the parse format, the field will not validate as populated from the database. Now, if a parseFormat (or formats, in an array) is specified it will be added to the list of acceptable formats (the default array plus the display format).
Configuration menu - View commit details
-
Copy full SHA for 992f370 - Browse repository at this point
Copy the full SHA 992f370View commit details -
Configuration menu - View commit details
-
Copy full SHA for be45c07 - Browse repository at this point
Copy the full SHA be45c07View commit details