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.

Is your feature request related to a problem? Please describe. For some applications, it would be great to have an event when the user picked the start date (single mode disabled) of a date range.

Describe the solution you’d like An event for the selection of the start date (single mode disabled). Alternatively, the existing onSelect event is called when the start date is selected (but with end date parameter null/false) and then again when the selection of the range is completed.

Describe alternatives you’ve considered I don’t think there is an alternative to this. 😕

Edit: It also seems that the onDayHover event doesn’t fire when clicking a day element (though it is stated in documentation), but only when also hovering the item (and moving the mouse around while over the element).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
pgmahoneycommented, Aug 12, 2020

This would be very useful. I have spent a lot of time trying to use onDayHover, but it doesn’t fire on click in Safari (but does in Chrome). My use case is to set a header based on whether it is the start or end date which is being selected. I also want to be able to default the end date to the start date, if only one date is selected.

I would be happy to have an option to trigger onSelect on each date selection, and then it would be up to the onSelect function to check if both dates are available.

2reactions
RVXDcommented, Sep 23, 2020

I have a case where I need to set the minDays option depending on the start date (high-season 14 days or low-season 7 days). So having the onSelect also fire when start date is selected would be nice. Or add events onSelectStart and onSelectEnd.

Read more comments on GitHub >

github_iconTop Results From Across the Web

onselectstart() function on HTML - javascript
I have this part of code in my windows.onload = function start() funtion. When I drag my mouse on top to down my...
Read more >
Node: selectstart event - Web APIs | MDN
The selectstart event of the Selection API is fired when a user starts a new selection.
Read more >
onselectstart event | selectstart event - Dottoro Web Reference
Occurs at the start of a selection process. The onselectstart event is cancelable, if you cancel it, the selection process does not start....
Read more >
onselect Event
The onselect event occurs after some text has been selected in an element. The onselect event is mostly used on <input type="text"> or...
Read more >
onselectstart event (Windows)
Fires when the object is being selected. Syntax. HTML Attribute, <element onselectstart = "handler(event)">. Event Property, object.
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