# Filtering: unexpected character '+' (relative dates)

**URL:** <https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544>\
**Category:** Bug\
**Created:** [3 July 2024 11:38 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544 "2024-07-03T11:38:24Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abel](https://community.vikunja.io/user_avatar/community.vikunja.io/abel/32/733_2.png) [@Abel](https://community.vikunja.io/u/Abel)\
**Post date:** [3 July 2024 11:38 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/1 "2024-07-03T11:38:24Z")

</div>

I am trying the new filters (they look good!!). Problem when trying: `dueDate < now+30d ` :  
**Error**  
The filter expression ‘(due\_date \< now+30d ) (done = false)’ is invalid: unexpected character ‘+’

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [3 July 2024 16:04 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/2 "2024-07-03T16:04:10Z")

</div>

That looks like a bug. I’ll take a look.

As a workaround, you can change the query to `dueDate < 'now+30d'` and it should work.

---

<div class="post-metadata">

**Author:** ![Abel](https://community.vikunja.io/user_avatar/community.vikunja.io/abel/32/733_2.png) [@Abel](https://community.vikunja.io/u/Abel)\
**Post date:** [3 July 2024 17:06 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/3 "2024-07-03T17:06:03Z")

</div>

Thanks, that seems to work!

I had some problems deleting the broken query. I had to first change to ‘done=false’, then save. Then I could open the screen again and I could copypaste the query.

If that sounds familiar you probably have it on your radar, if not let me know and I can try to make a video.

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [4 July 2024 14:03 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/4 "2024-07-04T14:03:29Z")

</div>

There is a known bug with the query saving, but I’m not sure if that’s related to your issue. If you could make a video, that would be great!

---

<div class="post-metadata">

**Author:** ![Abel](https://community.vikunja.io/user_avatar/community.vikunja.io/abel/32/733_2.png) [@Abel](https://community.vikunja.io/u/Abel)\
**Post date:** [5 July 2024 07:36 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/5 "2024-07-05T07:36:47Z")

</div>

Hmm tried making a video. But not sure how to blur/censor my own tasks… Rather not upload them 😉

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [5 July 2024 11:54 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/6 "2024-07-05T11:54:49Z")

</div>

Are you able to reproduce it on the demo?

---

<div class="post-metadata">

**Author:** ![Abel](https://community.vikunja.io/user_avatar/community.vikunja.io/abel/32/733_2.png) [@Abel](https://community.vikunja.io/u/Abel)\
**Post date:** [5 July 2024 12:39 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/7 "2024-07-05T12:39:51Z")

</div>

Good one.

In the recording you can see there are two problems:

1. Can’t change 1d to 2d
2. Saving fails when adding a condition to an existing filter

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [5 July 2024 15:38 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/8 "2024-07-05T15:38:53Z")

</div>

Thanks for the video! That seems like a new bug, I’ll take a look.

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [11 July 2024 09:29 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/9 "2024-07-11T09:29:54Z")

</div>

I’ve just pushed a fix for the first bug from this thread in [70615d6843](https://kolaente.dev/vikunja/vikunja/commit/70615d6843c7e6dc3bbbfdff82c82694b680129d). Please check with the next unstable build, if date queries work without quotes.

Do you still have the ui problem from the video if you don’t use quotes around the date value?

---

<div class="post-metadata">

**Author:** ![Abel](https://community.vikunja.io/user_avatar/community.vikunja.io/abel/32/733_2.png) [@Abel](https://community.vikunja.io/u/Abel)\
**Post date:** [12 July 2024 06:16 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/10 "2024-07-12T06:16:50Z")

</div>

I usually just install the .deb from the download site 👀 .

Do you have something like **try-unstable.vikunja.op** maybe?

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [12 July 2024 08:51 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/11 "2024-07-12T08:51:18Z")

</div>

The official [https://try.vikunja.io](https://try.vikunja.io) demo site runs on unstable.

---

<div class="post-metadata">

**Author:** ![Abel](https://community.vikunja.io/user_avatar/community.vikunja.io/abel/32/733_2.png) [@Abel](https://community.vikunja.io/u/Abel)\
**Post date:** [12 July 2024 09:47 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/12 "2024-07-12T09:47:29Z")

</div>

It seems I need to click outside of the editbox BEFORE clicking save, for saving to work 🙂

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [18 July 2024 14:33 UTC](https://community.vikunja.io/t/filtering-unexpected-character-relative-dates/2544/13 "2024-07-18T14:33:17Z")

</div>

> [@Abel](#):
>
> It seems I need to click outside of the editbox BEFORE clicking save, for saving to work 🙂

This is now fixed in [a25834b089](https://kolaente.dev/vikunja/vikunja/commit/a25834b0890af4df0786ca7269a0f8b3879979ba), please check with the next unstable build (should be ready for deployment in ~45min, also on [try](https://try.vikunja.io)).

The other issue you reported seems to be fixed now as well, can you confirm that?
