]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1831780: various improvements to the Angular date-select widget
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 25 Mar 2019 19:21:46 +0000 (15:21 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 30 Jul 2019 21:12:14 +0000 (17:12 -0400)
commite0e847784da1539a6644fcc711a3bda2240f57ee
treebcf048a51d820a6eda32f198f0820506fbcb5fc2
parente85fb2909381632ab114f0d923aeda5089e37467
LP#1831780: various improvements to the Angular date-select widget

Styling
-------
- the widget is now narrower
- the widget now enables form validation styles; in particular,
  entry of an incorrectly-formatted date is now highlighted
- the calendar drop-down is now allowed to overflow the containing
  element when expanded, making it easier to embed the date
  selector in other controls
- the calendar button (and any material icons button that's part of
  an input group) now has the same default font size as main text,
  making the overall date-select look cleaner

API
---
- add a reset() method
- hitting enter in the text box can now triggers emitting date
  change events
- a new onCleared event is emitted if the suer hits enter on an
  empty input
- onChangeAsYmd() now pads month and day to two digits apiece,
  making the result conform to ISO 8601 and thus more easily
  plugged into queries.
- adds the following methods to retrieve the current date; these
  are meant to be used via local template references in parent
  templates:

  currentAsYmd()
  currentAsIso()
  currentAsDate()

Sponsored-by: MassLNC
Sponsored-by: Georgia Public Library Service
Sponsored-by: Indiana State Library
Sponsored-by: CW MARS
Sponsored-by: King County Library System
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/date-select/date-select.component.css [new file with mode: 0644]
Open-ILS/src/eg2/src/app/share/date-select/date-select.component.html
Open-ILS/src/eg2/src/app/share/date-select/date-select.component.ts
Open-ILS/src/eg2/src/styles.css