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.

Pass down options to Flatpickr on the DatePicker component

See original GitHub issue

Summary

It would be nice to be able to pass down to Flatpickr itself some options that are you can’t set on the flatpickr instance itself (ie. inline: true)

In the React DatePicker component it’s a matter of adding a prop and then spreading it when initing flatpickr

Justification

We do have the need to have an inline/static picker on carbon-addons-iot for this story

As it right now, we are reparenting the calendar DOM into our component but this is far from the best option to do it.

Specific timeline issues / requests

For now we are going with the workaround but it would be nice to have soon 😃

Available extra resources

I can contribute back myself but I need some support from the Carbon team given that adding a new prop to DatePicker would break semver.

Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
aagonzalescommented, Apr 1, 2020

It was originally intentional to not include the inline format for datepicker. I think if we wanted to include it, it would need some visual exploration because of the calendar icon. This topic needs some investigation from the design perspective before we can determine if we should do it or not.

1reaction
davidicuscommented, Jul 16, 2021

Any discussion still being had on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Options
Config Option Type Default altFormat String "F j, Y" altInput Boolean false altInputClass String ""
Read more >
How do you pass options to Django-flatpickr date picker?
So what I'm really looking for is to be able to pass the dates that can't be selected to the datetime picker instance...
Read more >
Input date and time in HTML and Javascript || (flatpickr.js)
How to create a Javascript Datetime Picker with flatpickr.js that works with Bootstrap.Can be applied to date/datetime/datetime-local/any ...
Read more >
Date Picker
The DatePicker component utilizes Flatpickr under the hood. We will pass any extra options down to the FlatPickr instance. · The DatePickerInput takes...
Read more >
react-booking-form
... the date picker that should accept the inputComponent as a "launcher" for ... that will be passed down to the flatpickr React...
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