Greg
Greg

Reputation: 47094

How to specify date only in angular-bootstrap-datetimepicker

It seems to insist on making you choose a time also. I went through the read me several times and I'm not seeing how to only do a date.

https://github.com/dalelotts/angular-bootstrap-datetimepicker

Upvotes: 1

Views: 1321

Answers (1)

tanmay
tanmay

Reputation: 7911

You need to set minView to day in the config datetimepicker-config="{'minView':'day'}". It restricts selection till that level. So, by making it day, we won't let it select further days. Like this:

<datetimepicker ng-model="date" datetimepicker-config="{'minView':'day'}" />

That should do it!

Upvotes: 3

Related Questions