Is there a way to get the current input in onChange?
See original GitHub issueI’ve hacked this in:
var picker = flatpickr('....', {
onChange : function() {
picker.calendars[0].input.value = 'test';
}
});
But I’m pretty sure that’ll break. Is there a cleaner/correct way?
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
How to get the current state when processing the onChange ...
After much torment, I realized that I can do like this const [inputValue, setInputValue] = useState('') useEffect(() ...
Read more >How to Get the Value of an Input on Change in React
To get the value of an input on change in React, set an onChange event handler on the input, then use the target.value...
Read more >React onChange Events (With Examples) - Upmostly
The onChange event in React detects when the value of an input element changes. Let's dive into some common examples of how to...
Read more >How to Get the Current Value from a Lightning-Input-Rich-Text
Is there a way to increase the polling rate of a lightning-input-rich-text field? ... Can I just get its current value without needing...
Read more >How to Identify Different Inputs with One Onchange Handler
The most common approach is to attach an onChange event to each input field. Whenever the event is triggered, call a separate function...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Exactly what I was looking for. I am loving this plugin. Thanks!
http://chmln.github.io/flatpickr/#onchange
To target an onChange of a specific calendar, you need its flatpickr instance. Either you have something like
Or do something like