# Custom date selectors / date picker

**URL:** <https://discuss.elastic.co/t/custom-date-selectors-date-picker/300605>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [March 24, 2022, 4:18pm UTC](https://discuss.elastic.co/t/custom-date-selectors-date-picker/300605 "2022-03-24T16:18:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sg09](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sg09/32/84391_2.png) [@sg09](https://discuss.elastic.co/u/sg09)\
**Post date:** [March 24, 2022, 4:18pm UTC](https://discuss.elastic.co/t/custom-date-selectors-date-picker/300605/1 "2022-03-24T16:18:53Z")

</div>

Hi,  
could you please provide a sample project in codesandbox on how to use custom datetime selector/picker on search-ui ?  
I'm referring to this post, recommending custom components: [Filter search by date in search-ui](https://discuss.elastic.co/t/filter-search-by-date-in-search-ui/258929)

---

<div class="post-metadata">

**Author:** ![Carlos\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_d/32/126245_2.png) [@Carlos\_D](https://discuss.elastic.co/u/Carlos_D)\
**Post date:** [March 31, 2022, 10:17am UTC](https://discuss.elastic.co/t/custom-date-selectors-date-picker/300605/2 "2022-03-31T10:17:10Z")

</div>

hey @sg09 :

You can write your own datetime selector / picker, or choose one built for React (like [this one](https://www.npmjs.com/package/react-datetime-picker))

Please check the [build your own component guide](https://github.com/elastic/search-ui/blob/master/ADVANCED.md#build-your-own-component) to understand how to use `withSearch` to interact with Search UI.

You can use the `filters` state to look up the currently applied filters, and use the `setFilter` action to apply filters.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 28, 2022, 10:18am UTC](https://discuss.elastic.co/t/custom-date-selectors-date-picker/300605/3 "2022-04-28T10:18:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
