flutter_date_pickers icon indicating copy to clipboard operation
flutter_date_pickers copied to clipboard

Decorations for some disabled dates

Open zs-dima opened this issue 4 years ago • 5 comments

It could be nice to be able to add decorations for some disabled dates. For example for booking we want to display weekend and holidays in red color but dates before firstDate and after lastDate in grey.

zs-dima avatar May 28 '21 09:05 zs-dima

Can u assign it to me? I wanna try

albertoazinar avatar Oct 24 '21 08:10 albertoazinar

@AlbertoYabeda yes, you can suggest any decision. It would be great if you describe here what changes you would like to do before start coding. If you prefer make pr you can try as well.

MariaMelnik avatar Oct 24 '21 20:10 MariaMelnik

I was looking at one of the source code. So, I noticed there are an array and a variable responsible to control de week days. I was thinking, to solve this issue, using the variable weekday to see if the weekday is equal to six or seven, then paint to red. for the user to know its a weekend. about the days before and after the selected days, I was thinking about working with an array to paint the dates amongst the selected days (not that sure).

thanks for your time.

albertoazinar avatar Oct 28 '21 01:10 albertoazinar

@AlbertoYabeda sorry for delay. I believe this should be more generic solution. Maybe user would like to set special decoration not only for weekdays. For example some government services may have not working day at Wednesday. Thank you for your impact anyway!

MariaMelnik avatar Nov 04 '21 10:11 MariaMelnik

https://github.com/MariaMelnik/flutter_date_pickers/pull/102 . I add new styles for weekend. You can check it

beheobong avatar Oct 12 '22 03:10 beheobong