question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How should I call tileDisabled?

See original GitHub issue

Hi! I am building a reservation system, and using an external fetch, to determine that which days are disabled.

When I call my fetch, I return a list of days in a given month, with the value true or false, depending on if the day is already booked by someone else or not.

How should I call tileDisabled every time someone jumps between months with the «, ‹, ›, » buttons? Or could you recommend another approach? my fetch is something like this.

  isOverlapping = (roomId, month) => {
    const url = "https://apiurl.com/getOverlaps?"
    return fetch(`${url}roomId=${roomId}&month=${month}`)
      .then(res => res.json())
      .catch(e => console.error(e))
  }

Then I get the JSON of the following format:

[
  "2018-03-01": {
      beforeNoon: false,
      afterNoon: true
   },
  "2018-03-02": {
      beforeNoon: true,
      afterNoon: false
   },
   ... and so on, the whole month
]

Here, the customer arrives at 2018 March 1 at 14:00, and leaves on 2018 March 2 10:00

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
balazsorban44commented, Mar 23, 2018

Thanks, I will try, and give you feedback how it went. Definitely a good idea to fetch several months at the same time. Nice work, by the way. 👌

0reactions
wojtekmajcommented, Aug 14, 2018

I’m closing this issue to give other issues more visibility. If you still need assistance with this matter, please do not hesitate to reply and I’ll reopen.

Happy coding!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-calendar tiledisabled | The AI Search Engine You Control
I am building a reservation system, and using an external fetch, to determine that which days are disabled. When I call my fetch...
Read more >
react-calendar tileDisabled Saturdays and Sundays
I want to disabled every Saturday and Sunday on my react-calendar. So I used the tileDisabled function like this:
Read more >
“Tile Is Disabled” Notification (iOS)
When you force close the Tile app, it is no longer running in the background. This means you will not be able to...
Read more >
Edit quick tile disabled for some reason. Can not add ... - Reddit
have you tried execute this command through adb. adb shell settings put secure sysui_qs_tiles "$(settings get secure sysui_qs_tiles),edit".
Read more >
Why is my Tile disabled? - TechShift.net
Then tap on Activate a Tile. Tap Next and then hold the Tile tracker near your phone or tablet for a few seconds...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found