I’m trying to make the opening hours view on fullcalendar configrable on a day by day basis, The code is as follows:
dmx-business-hours.d1="{startTime:_SSN.data._userInfo.open_hours.mon_open,endTime:_SSN.data._userInfo.open_hours.mon_close,daysOfWeek:[1]}" dmx-business-hours.d2="{startTime:'09:45',endTime:'16:00',daysOfWeek:[2]}">
the manually configured .d2 works, the values coming from my session don’t.
There are values in the session variables. What’s the binding format required here ?
Thanks all
@Teodor
I’ve added the single quotes as outlined but no joy.
dmx-business-hours.d3="{startTime:'\''+_SSN.data._userInfo.open_hours.mon_open+'\'',endTime:'16:00',daysOfWeek:[3]}"
What am I missing ?
Thanks
dmx-business-hours.d3="{startTime:'_SSN.data._userInfo.open_hours.mon_open',endTime:'16:00',daysOfWeek:[3]}"
NO GOOD either. What are you trying to tell me in your cryptic way ?
Teodor
March 25, 2022, 10:57am
6
Hello @scalaris
All i am doing is editing your posts so that the code is properly formatted.
Please when posting code follow this:
Code Formatting
When pasting code in your posts, please use the following formatting options, in order to be sure your code is readable and well formatted for the rest of the users.
Inline code formatting
Surround a section of code with backticks (`) inline code formatting.
Typing:
`var x = 10;`
Results in:
var x = 10;
This can also be done as var x = 10; inline.
Multi-Line Blocks of Code
Surrounding code with three backticks ``` will allow for code to span multiple lines
Typing:
```
f…
and don't just paste code in the post, as it's not well readable and formatted.
Right. thanks
Any clues as to what I’m doing wrong ?
Teodor
March 25, 2022, 10:59am
8
Maybe @patrick can be more of a help here.
Place some logging around it like
dmx-business-hours.d1="log({startTime:_SSN.data._userInfo.open_hours.mon_open,endTime:_SSN.data._userInfo.open_hours.mon_close,daysOfWeek:[1]})"
it should then log the parsed value in the console of devtools.
The values appear correct but the diary isn’t greyed out accordingly. It’s showing all day. If set manually, it’s fine.
@patrick Here’s a perfect example. Monday is set programattically, Tuesday is set manually. The open/closed hours don’t render when set programmatically
Where exactly is the data coming from, it looks like it was first undefined and then set with a delay. Perhaps the calendar has some issues with the data coming later, will do some testing for that.
The calendar entries come from a SQL query, no problems there, and the daily working hours from session variables - which all have values as can be seen. So it’s a case the calendar is not rendering working hours when defined programmatically - only when pre-set
Please test with this update: dmxCalendar.zip (3.7 KB)
Teodor
March 31, 2022, 8:47pm
17
This has been fixed in Wappler 4.7.2
Teodor
Closed
April 2, 2022, 3:00pm
19
This topic was automatically closed after 42 hours. New replies are no longer allowed.