OpenWork-NZ / core-geonetwork

GeoNetwork repository
http://geonetwork-opensource.org/
GNU General Public License v2.0
0 stars 3 forks source link

Button to populate creationDate with today's date #33

Closed alcinnz closed 3 years ago

alcinnz commented 3 years ago

Can do it just through the calendar as it shows todays date by default. All that is needed is to select it. Still a single click (a "now" button) would be better.

alcinnz commented 3 years ago

Out-of-scope for contract, at least for the moment.

alcinnz commented 3 years ago

Fixed in b22360d8c2635e57e56b6eac4708b1bcb776b061 by extending components/edit/datepicker/DatePickerDirective.js & components/edit/datepicker/partials/datepicker.html to add that "now" button, setting the appropriate data to the current time retrieved via new Date(). This required adding some new functions to the scope for the HTML to call, because that didn't like using the new Date() browser API.

Relatedly cb566a1 removed the fallback datepicker's demand for a time to be entered by configuring it to not only select dates via the minView: 'day' configuration.