TheCoder4eu / BootsFaces-OSP

BootsFaces - Open Source Project
Apache License 2.0
246 stars 102 forks source link

dateTimePicker disabledDays issues #1078

Closed kuytsce closed 5 years ago

kuytsce commented 5 years ago

I guess this would come under User Support.

I'm using Bootsfaces for the first time and I've got the dateTimePicker component working however I need to disable weekends and certain holidays so they can't be selected.

I've tried using the week-days-disabled attribute to disable weekends however this isn't working and all days are still available to be selected.

<b:dateTimePicker id="datePicker" value="#{bean.date}" show-time="false" format="DD/MM/YYYY" week-days-disabled="[0,6]" />

In addition I've tried using the disabled-days/enabled-days attributes to disable certain holidays however your documentation advises that the attribute accepts an array of date, moment, string. I can work out what to enter for date and moment but I don't know what string would be required? Can you advise, preferably with an example that would be great. I can't find any examples online.

Thanks

stephanrauh commented 5 years ago

It seems we've simply forgotten to implement week-days-disabled. Now it's there.

stephanrauh commented 5 years ago

The "String" refers to a JavaScript string. Such as disabledDates="'08/03/2019'". I've added an example to the documentation.