We are using ng2-datetime-picker in a project I'm working on and we needed a couple of features that were missing so I added them.
Added a transparent, fixed position layer that covers the viewport and closes the datepicker when clicked. I find this a better option than to listen to a global click or to the blur event of the input that opened the datepicker. I added a flag show-close-layer to control this.
Added a slide-in drawer style implementation for the datepicker for mobile viewports (arbitrarily chosen to be max-width: 767px).
Made the next/prev navigation slightly bigger to be easier to hit with a mouse.
Feel free to use the ideas or the code if you wish!
We are using ng2-datetime-picker in a project I'm working on and we needed a couple of features that were missing so I added them.
Added a transparent, fixed position layer that covers the viewport and closes the datepicker when clicked. I find this a better option than to listen to a global click or to the blur event of the input that opened the datepicker. I added a flag
show-close-layer
to control this.Added a slide-in drawer style implementation for the datepicker for mobile viewports (arbitrarily chosen to be max-width: 767px).
Made the next/prev navigation slightly bigger to be easier to hit with a mouse.
Feel free to use the ideas or the code if you wish!
Cheers,
Manne