Ionic-Calendar icon indicating copy to clipboard operation
Ionic-Calendar copied to clipboard

How to set weekview to custom time interval?

Open kovacssupki opened this issue 8 years ago • 7 comments

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

kovacssupki avatar Jan 20 '17 14:01 kovacssupki

@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?

twinssbc avatar Jan 21 '17 16:01 twinssbc

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 avatar Jan 25 '17 09:01 kovacssupki

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.

kovacssupki avatar Jan 25 '17 14:01 kovacssupki

@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.

twinssbc avatar Jan 25 '17 15:01 twinssbc

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?

kovacssupki avatar Jan 25 '17 15:01 kovacssupki

@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.

twinssbc avatar Jan 25 '17 16:01 twinssbc

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

kovacssupki avatar Jan 25 '17 16:01 kovacssupki