excid3 / combined_time_select

A Rails time_select like Google Calendar with combined hour and minute time_select

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable Option

MarlabsKochi opened this issue · comments

Hi @excid3 Is there is any option available for disabling some time slots ?

For Example, I am using 10AM till 2PM with 30 interval, we can
10,10.30,11,11.30, 12, 12.30, 1, 1.30, 2

I want to disable only 11.30. Is that possible using your gem ?

@MarlabsKochi Not currently, and not sure I have plans to do that or not, but if you override this method, you can modify this loop in order to skip the times you don't want included. https://github.com/excid3/combined_time_select/blob/master/lib/combined_time_select.rb#L54

I would just implement this in an initializer or something and that should do the trick.