Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i can't able to select month and year after selecting date #325

Open
aleximmanuel opened this issue Mar 7, 2017 · 1 comment
Open

i can't able to select month and year after selecting date #325

aleximmanuel opened this issue Mar 7, 2017 · 1 comment

Comments

@aleximmanuel
Copy link

i can't able to select month and year after selecting date .. it allows only to change the date ...when pressing the month or year its disables

input type="date" class="form-control ng-scope ng-dirty ng-touched ng-valid ng-valid-required" name="due_date" date-time="" view="date" format="YYYY-MM-DD" auto-close="true" min-view="date" ng-model="duedate" readonly="" required="" date-change="changeDueDate"

@DanTalash
Copy link
Contributor

DanTalash commented Mar 7, 2017

The issue appears to be with the attributes provided.

Firstly, the input type is set to date which means the browser will try to use its native datepicker element and this library simultaneously. This doesn't really work, which is why you won't see a value in the datepicker.

Secondly, because auto-close is set to true the picker will close once the user has selected a value. Even if this option is off, the picker will never switch to selecting months or years after the user has selected a day.

Finally, the initial view for the picker is set to date which means that when the picker is opened, it starts by showing the possible days of the month. In order to select months or years from this view the user needs to click on the middle element at the top of the picker to go up a view. In order for the picker to open on the month or year views, the view attribute should be set to the appropriate value.

See this plunkr for examples of the various options and their effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants