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.

Updating scroll date when passing a function into `onselect`

See original GitHub issue

I’m using the following code to update my component when a date is selected:

onSelect={date => {
  this.setState({fcDate: date})
}}

This properly updates the state to the selected date, but it does not update the selected date on the InfiniteCalendar component. Do I need to return something? Do I need to manually call setScrollDate(date) somehow?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
claudericcommented, May 13, 2017

Haha no worries! Glad you were able to figure it out 😄

0reactions
dben89xcommented, May 13, 2017

@clauderic Thank you for the amazing tool, by the way. I am loving it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update style of a component onScroll in React.js
I've tried storing the value of itemTranslate in the state of the component, and calling setState in the scroll callback. However, this makes...
Read more >
Range > Events > onChange - Mobiscroll for JQuery API ...
Name Type Default value anchor String, HTMLElement undefined animate String or Boolean undefined autoCorrect Boolean true
Read more >
onselect Event - W3Schools
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 >
Setvalue is not updating properly in onchange for - ServiceNow
I am writing a script to populate the values from list collector to Multi line text field using catalog client script onchange function....
Read more >
PowerApps Date and Time Functions - YouTube
In this video, you will learn about the PowerApps Date and Time functions. We cover Today(), Now(), datetimevalue, datediff, dateadd, ...
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