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 set weekview to custom time interval? #112

Open kovacssupki opened 7 years ago

kovacssupki commented 7 years ago

It is possible to set weekview to an interval? and block all other date outside ? I need for an event to list activites inside an event. Thanks

twinssbc commented 7 years ago

@kovacssupki Could you elaborate on your requirement? maybe provide a mockup? Do you mean you only want to show certain days in a week instead of 7 days? Or you still want to display 7 days, but not allow user to add/remove events to some dates?

kovacssupki commented 7 years ago

So i have an event from 1july 2017 to 3july 2017 i want to show only these 3 days. or if it's posible to show active only these 3 days and the rest to be blocked in the 7 days view. Thanks. untitled

kovacssupki commented 7 years ago

another question how can i change the wekview header format? as you see i would need bigger numbers. and do not need the all day event row. Thanks.

twinssbc commented 7 years ago

@kovacssupki According to your screenshot, all days are displayed, and each event has different start time and end time. This layout is quite similar to my calendar's layout. I don't quite sure about your use case. Why do you want to hide days depending on the event? Let's say you have another event from July 2nd to July 4th. How do you want to display? Display July 1st to July 4th and block other days? Looks like your requirement is not a general one. So you need to modify the source code.

Regarding your second question. You can achieve the effect by overriding the css style. For the weekview header, it has class "weekview-header". To hide the all day event row, you can set "weekview-allday-table" to {display: none} and set the margin-top of "weekview-normal-event-container" accordingly.

kovacssupki commented 7 years ago

Where can i set the currentDay to the event start day let's say 1's july? And in weekview-header i have only a text, i have to differentiate the day name with the number. so i will need a span in there? Is that possible?

twinssbc commented 7 years ago

@kovacssupki If you use below option, you can change calendar.currentDate value to specify the currentDay. But it seems you want to highlight the current day? It's only possible in monthview.

[currentDate]="calendar.currentDate"

The weekview header only supports date format, it doesn't allow such customization.

kovacssupki commented 7 years ago

can we make an option to support html format to or an option for week view template?