twinssbc / Ionic-Calendar

A calendar directive for Ionic framework
http://twinssbc.github.io/Ionic-Calendar/demo
MIT License
159 stars 73 forks source link

Changing current date via ng-model of calendar doesn't work (a.k.a. "Today button doesn't work") #16

Closed Arxi closed 8 years ago

Arxi commented 8 years ago

For example, take the official demo: http://twinssbc.github.io/Ionic-Calendar/demo/#/tab/home

  1. load the demo as it is, in month view.
  2. change the month - e.g. slide to left or right (once or multiple times, it doesn't matter)
  3. press "Today" button. This basically does $scope.calendar.currentDate = new Date(); in the controller the calendar.currentDate is bound to <calendar> element via ng-model="calendar.currentDate" attribute on the <calendar> element.
  4. the title of the calendar changes correctly to current month and year, but the actual view is not updated - numbers of days are in the wrong positions in the calendar
  5. now try clicking on any day in the calendar area. The calendar slides to left or right, which is also unexpected behaviour.

My browser info: Chromium Version 45.0.2454.101 Built on Ubuntu 14.04, running on LinuxMint 17.2 (64-bit)

Any ideas?

twinssbc commented 8 years ago

@Arxi Thanks for reporting this, I think it's a bug, I will fix it asap.

twinssbc commented 8 years ago

@Arxi I have submitted the fix in version 0.1.5. Could you have a check? Thanks.

Arxi commented 8 years ago

Sorry for the delay! I can confirm that the calendar behaves correctly in my setup in version 0.1.5, and the public demo seems to work correctly too.

Thank you for your time and hard work!