twinssbc / Ionic-Calendar

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

How to move a day forward and backward with my own inputs? #180

Open Raagu1993 opened 5 years ago

Raagu1993 commented 5 years ago

@twinssbc

I could move a day forward and backward by using below events. $scope.$broadcast('changeDate', 1); $scope.$broadcast('changeDate', -1);

but how can I move to a specific day with my own inputs? for example, my input will be 20th Feb. I should directly move to 20th Feb instead of clicking 10 times on event.

twinssbc commented 5 years ago

@Raagu1993 Suppose you bind the ng-model to calendar.currentDate. You just need to set calendar.currentDate to 20th Feb.

<calendar ng-model="calendar.currentDate" ...></calendar>
Raagu1993 commented 5 years ago

Thanks, it is working fine now. This plugin helped me a lot.

one last question. Is it possible to add 12 AM at the bottom? Kindly find the attached screen grab. And time should display in front of that horizontal line.

https://lh3.googleusercontent.com/-565a9G-KtiE/XGJftieHEXI/AAAAAAAAAAY/9sqEIEahDR8coC72wDC9Yb1Hutm3YU1PQCL0BGAYYCw/h424/2019-02-11.png

twinssbc commented 5 years ago

@Raagu1993 I get the idea that you want to make the time label displays as the start hour and end hour. But this calendar is not designed like that. the whole calendar is a table, so the time label appears in the row, indicating the whole hour, instead of in front of a line.