Good Day i copied some code from a site and it does what I want to a extent. The code generates a calendar and lowers days to be selected and provides a summery Date to Date I want to change the code to exclude weekends from the selection.
Code : If(!_initialized, UpdateContext({_today:Today()}); UpdateContext({_firstDayOfMonth:DateAdd(_today,1-Day(_today),Days)}); UpdateContext({_firstDayInView:DateAdd(_firstDayOfMonth,-(Mod(Weekday(_firstDayOfMonth)-2,7)+1),Days)}); UpdateContext({_holidays:Table({HolidayDate:Date(2016,12,25)}, {HolidayDate:Date(2017,1,1)}, {HolidayDate:Date(2017,1,16)}, {HolidayDate:Date(2017,2,20)}, {HolidayDate:Date(2017,5,29)}, {HolidayDate:Date(2017,7,4)}, {HolidayDate:Date(2017,9,4)}, {HolidayDate:Date(2017,11,23)}, {HolidayDate:Date(2017,11,24)}, {HolidayDate:Date(2017,12,25)} ) }); UpdateContext({_initialized:true}) )
Output button : If( _selectedCount = 1, Text(_selectionStart, DateTimeFormat.ShortDate), _selectedCount = 2, Text(_selectionStart, DateTimeFormat.ShortDate) & " - " & Text(_selectionEnd, DateTimeFormat.ShortDate), "none")
Now my problem is I am pretty bad on the code side and I have no idea what to do. If I can get guidance on maybe how to fix my issue and maybe more important to my long term ability to use/read/employ code.

Report
All responses (
Answers (