# Datepicker + CMS Filter (date format in French

**URL:** https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054
**Category:** General
**Created:** [June 15, 2023, 4:04pm UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054 "2023-06-15T16:04:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![terence](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/terence/32/810_2.png) [@terence](https://forum.finsweet.com/u/terence)
#### Post date: [June 15, 2023, 4:04pm UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/1 "2023-06-15T16:04:33Z")

</div>

Hi!

I’m trying to add 2 date picker and use them to range filter a CMS list.

I’ve add all the attribute, when I test with only number, the range filter works, but when I add this attribute (fs-cmsfilter-type=“date”) it’s not working anymore.

Here is the readonly link → [Webflow - NEC](https://preview.webflow.com/preview/nec?utm_medium=preview_link&utm_source=designer&utm_content=nec&preview=fd1444ec9cd8fa799ed1cfe303b10c4d&pageId=6482eb7ee79aa55d3a569485&workflow=preview)

This is the date I’m trying to filter

 ![Capture d’écran 2023-06-15 à 18.03.08](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/1X/9463f5c82215e8c71f6b7fcc60790f773a4ffb12.jpeg)

This is the “from” input

 ![Capture d’écran 2023-06-15 à 18.03.38](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/1X/d631636161adbedecf7905d56c128f75738bed54.jpeg)

And this is the “to” input

 ![Capture d’écran 2023-06-15 à 18.04.06](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/1X/8516248ac88fe9991aa41991cafe5ebac8d6ffa7.jpeg)

Am I missing something?

Thanks for your help! 🙂

---

<div class="post-metadata">

### Author: ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)
#### Post date: [June 15, 2023, 5:18pm UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/2 "2023-06-15T17:18:47Z")

</div>

Hey @terence! If you do not add the `date` type, are the items filtered correctly within the range?

If you could share a live link to test I’d appreciate that

---

<div class="post-metadata">

### Author: ![terence](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/terence/32/810_2.png) [@terence](https://forum.finsweet.com/u/terence)
#### Post date: [June 15, 2023, 8:02pm UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/3 "2023-06-15T20:02:58Z")

</div>

Hey @Support-Luis! If I remove the date type and search on an other input, like the text “50”, yes the range works

Yes here is a live link → [Évènements 2](https://nec.webflow.io/evenements-2) 🙂

---

<div class="post-metadata">

### Author: ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)
#### Post date: [June 15, 2023, 10:16pm UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/4 "2023-06-15T22:16:36Z")

</div>

Hey @terence I am afraid this approach is not going to work out out of the box. What we can try to do is add a hidden [Range Slider](https://finsweet.com/attributes/range-slider) which can work with date ranges and mirror the values to the slider’s input with [Mirror Input Values](https://finsweet.com/attributes/mirror-input-values).

If this does not work we can try some custom code to reformat the date from `12/06/2023` to `12062023` in both the filter and the cards and use this as the filter field.

---

<div class="post-metadata">

### Author: ![memetican](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/memetican/32/1019_2.png) [@memetican](https://forum.finsweet.com/u/memetican)
#### Post date: [July 13, 2023, 7:04am UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/6 "2023-07-13T07:04:36Z")

</div>

Ah this has been driving me mad for the past few days. I’ve been wrestling with exactly the same situation, which according to the FS docs should work fine.

What’s weirder is that it works great on 50% of the devices I’ve tested, while the other 50% return no matches. The difference doesn’t appear to be related to timezone, locale, date format, OS, browser… and, no errors are thrown when it fails.

Here’s a demo of two devices side-by-side.  
Also the [prototype link](https://cms-filter-test-da71c9.webflow.io/).

---

<div class="post-metadata">

### Author: ![memetican](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/memetican/32/1019_2.png) [@memetican](https://forum.finsweet.com/u/memetican)
#### Post date: [July 13, 2023, 8:05am UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/7 "2023-07-13T08:05:15Z")

</div>

Hi Luis, mirrorinput + range slider is resulting in exactly the same problem.

---

<div class="post-metadata">

### Author: ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)
#### Post date: [July 13, 2023, 5:27pm UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/8 "2023-07-13T17:27:24Z")

</div>

Hey @memetican, I am getting this error on my end, seems to be the endDate set to `infinity` on your code. Can you try this instead?

```auto
endDate = new Date(today);
endDate.setFullYear(endDate.getFullYear() + 10); // Add 10 years to the current year (adjust as needed)

```

 ![Screen Shot 2023-07-13 at 11.22.26](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/9/90e99fb8d89e3fd3caf0f789b24d4145e59a2742.png)

This might not be the solution for the mobile issue, which is the first I’ve seen CMS Filter behave differently on other devices, but it clears an error from the build

---

<div class="post-metadata">

### Author: ![memetican](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/memetican/32/1019_2.png) [@memetican](https://forum.finsweet.com/u/memetican)
#### Post date: [July 14, 2023, 1:54am UTC](https://forum.finsweet.com/t/datepicker-cms-filter-date-format-in-french/1054/9 "2023-07-14T01:54:13Z")

</div>

Thanks Luis, that was just an open-ended timerange hack.  
Here’s a version of the page, that has zero script on it, except finsweet’s filtering.

[https://cms-filter-test-da71c9.webflow.io/basic](https://cms-filter-test-da71c9.webflow.io/basic)

Here’s a capture of exactly the same problem occurring on an android device ( also seen on some chrome desktops as well as an iPhone / Safari ).

On these devices no errors are reported but filtering fails on a closed date range.
