Skip to content

Calendar defaultValue problem #296

@aybarshazar

Description

@aybarshazar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions