# Daterangepicker with plotly graph\_objects

**URL:** <https://community.plotly.com/t/daterangepicker-with-plotly-graph-objects/38567>\
**Category:** 📊 Plotly Python\
**Created:** [April 28, 2020, 4:26pm UTC](https://community.plotly.com/t/daterangepicker-with-plotly-graph-objects/38567 "2020-04-28T16:26:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cheen](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@Cheen](https://community.plotly.com/u/Cheen)\
**Post date:** [April 28, 2020, 4:26pm UTC](https://community.plotly.com/t/daterangepicker-with-plotly-graph-objects/38567/1 "2020-04-28T16:26:21Z")

</div>

Hi,  
I’m using plotly to creat charts in my Flask app.  
I would like to know if there is any possibility to create a daterangepicker with plotly (not using dash).  
Or is there any other way to filter the dates on a chart using a precise date (filtering with a calendar for example) ?

Thanks.

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 29, 2020, 9:16am UTC](https://community.plotly.com/t/daterangepicker-with-plotly-graph-objects/38567/2 "2020-04-29T09:16:16Z")

</div>

Hi @Cheen, welcome to the forum! You have several options, none of them is as good as using a Dash daterangepicker though.  
You can use a [range-slider](https://plotly.com/python/range-slider/) to select a time interval, this is probably the easiest option. Or you can add [sliders](https://plotly.com/python/sliders/) or [dropdowns](https://plotly.com/python/dropdowns/) to choose the start and end date, and configure the `updatemenus` attribute to change the range of the plot when one of the controls is changed.

---

<div class="post-metadata">

**Author:** ![Cheen](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@Cheen](https://community.plotly.com/u/Cheen)\
**Post date:** [April 29, 2020, 9:37am UTC](https://community.plotly.com/t/daterangepicker-with-plotly-graph-objects/38567/3 "2020-04-29T09:37:32Z")

</div>

Thank you Emmanuelle for your answer 🙂.  
I will try to do that using a form element in which the type will be “date” and I will use the dates selected by the user to change the axes range, my only problem was that I still have difficulties to understand well plotly because I use a python and javascript part of plotly to plot charts on my flask app.  
Next time I will consider using dash for more simplicity.

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 29, 2020, 9:42am UTC](https://community.plotly.com/t/daterangepicker-with-plotly-graph-objects/38567/4 "2020-04-29T09:42:53Z")

</div>

If you want to embed a Dash app into your Flask app, there is a [documentation page](https://dash.plotly.com/integrating-dash) for this.

---

<div class="post-metadata">

**Author:** ![Cheen](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@Cheen](https://community.plotly.com/u/Cheen)\
**Post date:** [April 29, 2020, 9:46am UTC](https://community.plotly.com/t/daterangepicker-with-plotly-graph-objects/38567/5 "2020-04-29T09:46:51Z")

</div>

Exactly what I needed, thank you.
