ng2-ui / datetime-picker

Angular2 DateTime Picker
https://ng2-ui.github.io/#/datetime-picker
MIT License
121 stars 62 forks source link

Delete/clear value #172

Closed chrisbenseler closed 7 years ago

chrisbenseler commented 7 years ago

Is it possible to set a null/blank value to the datetimepicker?

Example, with this code:

<input [(ngModel)]="publishdate" ng2-datetime-picker name="publishdate" />

if 'publishdate' has an date, user cannot delete the value from the input field. On the focus (click) of the input the datetimepicker opens. I can add an extra button next to the input tha sets the publishdate do null, but is there anything built-in?

allenhwkim commented 7 years ago

I do not fully understand the problem you have. Could you explain with an example plunker?

chrisbenseler commented 7 years ago

@allenhwkim I could achieve what I needed (delete an value from the input after the selection of a date). The problem is that if the input is on the footer of the page/browser, the datetimepicker opens above it, and then the user is not able to edit the input with the keyboard (pressind backspace/delete keys, for example). Is it possible to force the position of the datetimepicker, to opens above the input?

allenhwkim commented 7 years ago

@chrisbenseler yes it is possible with some code change, but please create another issue with some screenshots for that after closing this.

chrisbenseler commented 7 years ago

I'll do it!