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

Calendar defaultValue problem #296

Closed
aybarshazar opened this Issue Mar 16, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@aybarshazar
Copy link

aybarshazar commented Mar 16, 2015

After the calendar is initialized, setting the defaultValue does not seem to affect the view in 2.15.0. This used to work in 2.13.2.

Edit: Some sample code for clarification:

  1. Add an input element with a class of datepicker.

  2. Initialize it.

var datepicker = $('.datepicker');

var options = {};

datepicker.mobiscroll().calendar(options);
  1. Now try to change the default date, in this case I'm decrementing the year by 5:
var datepicker = $('.datepicker');

var now = new Date();

var someDate = new Date(now.getFullYear() - 5, now.getMonth(), now.getDate());

datepicker.mobiscroll('option', 'defaultValue', someDate);

Now click the datepicker. It'll show the updated date in 2.13.2 but it won't display in 2.15.0. If this is an expected behaviour of version 2.15.0, the issue could be closed.

@aybarshazar aybarshazar changed the title Calendar defaultValue Calendar defaultValue problem Mar 16, 2015

@dioslaska dioslaska added this to the 2.15.1 milestone Mar 25, 2015

dioslaska added a commit that referenced this issue Mar 25, 2015

@dioslaska

This comment has been minimized.

Copy link
Contributor

dioslaska commented Mar 26, 2015

Done, will be released in 2.15.1

@dioslaska dioslaska closed this Mar 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment