Separate date and datetime options in date picker control#9153
Separate date and datetime options in date picker control#9153PascalLike merged 4 commits intogeonetwork:mainfrom
Conversation
c2cebf3 to
45c70a6
Compare
josegar74
left a comment
There was a problem hiding this comment.
@GeoSander I have done this test:
-
Create a new ISO19139 metadata, and set a date.
-
Save the metadata --> the form shows the date properly
-
Change to datetime and set the time.
-
Save the metadata --> the form shows the datetime properly
-
Change to date and save the metadata --> the form shows the datetime instead of the date
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
web-ui/src/main/resources/catalog/components/edit/datepicker/DatePickerDirective.js
Outdated
Show resolved
Hide resolved
|
Thanks for the review @josegar74, I fixed ES5 compatibility (and adjusted my IDE to skip ES6 inspections). |
67e5dd0 to
5e52dec
Compare
…formance of tz population [geonetwork#9152]
5e52dec to
d99b94c
Compare
|
@tylerjmchugh Are you able to have a look at this? |
josegar74
left a comment
There was a problem hiding this comment.
Thanks @GeoSander, the issue described is fixed and looks working well.
Nice improvements have also been made to the code, including for managing time zones.
tylerjmchugh
left a comment
There was a problem hiding this comment.
Tested, works as expected.
- Time is hidden by default with the option of adding a time (unless
hideTimeInCalendar) - Time is shown if the existing data includes a time.
Description
This PR breaks the "Date or date time" option in the
DatePickerDirective.jsinto 2 separate options:Date (only) will be the default option when creating new records.
For existing records, if there's a time component (and
hideTimeInCalendaris not set), it will show date and time first.Furthermore, the directive has been cleaned up and refactored a bit, and the CSS simplified (using
flex). The HTML dropdown contains an additional option (ifhideTimeInCalendaris falsy) and 2 new translation keys (dateOnlyModeanddateTimeMode) so there will not be any conflicts with the old dropdown translations for older versions.The
calendaricon for the mode selector was changed to acogicon to make clear that it's a config option and to make sure that it cannot be confused for the other calendar icon in the date field.Please read issue #9152 for more context.
Checklist
mainbranch, backports managed with labelAPI Changes are identified in commit messagesTesting provided for features or enhancements using [automatic tests](https://github.com/geonetwork/core-geonetwork/blob/main/software_development/TESTING.md)Build documentation provided for development instructions inREADME.mdfilesLibrary management usingpom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation