nhn / tui.calendar

🍞📅A JavaScript calendar that has everything you need.
http://ui.toast.com/tui-calendar
MIT License
11.99k stars 1.29k forks source link

Add ability to set weekend days #516

Open abozanona opened 4 years ago

abozanona commented 4 years ago

Version: v1.12.11

Current Behavior

Current code sets first & last day in the week as weekend days function isWeekend

isWeekend: function(day) {
    return day === 0 || day === 6;
},

Wanted Behavior

It't be great if I can enter custom weekend days(Pass an array of numbers I want to mark as weekend).

jungeun-cho commented 4 years ago

I think 'weekend' means Saturday and Sunday. Why do you need weekend customization?

Do you just want to mark different days of the week as weekends?

abozanona commented 4 years ago

In our system, Some countries weekend days are Saturday and Sunday, some other countries have Friday and Saturday as their weekend days and some countries only have Friday.

I could see that there's an option in the calendar to hide weekends, and that depends on isWeekend function.

I want to mark specific days as weekends, and hide them when narrowWeekend is true

jungeun-cho commented 4 years ago

Ah! I undertand. TOAST UI Calendar 2.0 is expected to support this feature. :)

abozanona commented 4 years ago

Great! Do you know when will v2.0 approx. be released?

dongsik-yoo commented 4 years ago

@abozanona It will take long time. I'm rewriting this calendar with virtual dom. There are many features those are hard to explain briefly, so check this article.

dongsik-yoo commented 4 years ago

@abozanona I'll let you know if there is more specific release date.

pythiantech commented 4 years ago

Would be great to have this feature as the application we are developing is to be used in a country where Friday and Saturday are considered as weekend.

luayjal commented 2 years ago

@jungeun-cho @dongsik-yoo now, are you support this feature or any way to off some days and hide some days?

adhrinae commented 2 years ago

@luayjal We don't have any plan for those features.