-
-
Notifications
You must be signed in to change notification settings - Fork 502
Separate date and datetime options in date picker control #9153
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
base: main
Are you sure you want to change the base?
Conversation
c2cebf3 to
45c70a6
Compare
josegar74
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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). |
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 (ifhideTimeInCalendarisfalse) and 2 new translation keys (dateOnlyModeanddateTimeMode) so there will not be any conflicts with the old dropdown translations for older versions.The
calendaricon 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