Make "First day of the week" in the date picker configurable

Make a configurable option to select what day is the first day of the week. This is different around the world, and the current setup in the date picker isn’t good for pretty much anyone except Americans.

It currently displays Sunday as the first day of the week. In Europe (and many other parts of the world), Monday is the first day of the week.

An option to select this would save me and other non-American users from clicking on the wrong day because of how the date picer calendar is formatted.

Great point - thanks for posting.
I ran out of votes but want support this request :+1:

1 Like

Better still, allow natural language parsing of dates. There is a javascript library which does this.

3 Likes

V-Calender, which this plugin uses, does support setting first day of week (see Defaults | V-Calendar). The plugin “just” needs an interface to let the user set their preference.

I notice now, that when using LS in German, the calendar is localised with Monday as first day of the week:

Thanks for the info, unfortunately this isn’t the case for me!?
Are you using the desktop version? (I am using Logseq v0.3.7, desktop, windows, language=“Deutsch”).

2021_0909_0852_01

Any idea why this is working for you?

My IT is blocking the non-signed Windows app, so I can’t test there. My screenshot is from the desktop app on a MacBook.

Sorry, my comments are completely irrelevant here. I’ve been looking at the calendar plugin for the whole time.

The date picker here is actually like in your screenshot, so I fully support this request.

This is a small but very important detail! Please let me pick dates in weeks that start on Mondays!

+1. Very important to have!

Surprise – there is a setting! :slight_smile: I found it when browsing the source code on Github. Here you go. Add the following lines to the options in your config.edn (you can open the config file via the settings menu):

;; This is not 'murrica
 :start-of-week 0

You don’t need the comment line, of course :wink:

8 Likes

wonderful thanks for the tip!

I’m really surprised there’s not more requests for natural language parsing.

@ipetter @jllailes sorry, but for me this doesn’t work. I put that start-of-the-week 0 setting in my config-file, but the datepicker still starts with Sunday (v0.7.4 on Windows 10, German) re-index and restart didn’t help

1 Like

Same for me,
tried this

;; This is not 'murrica
:start-of-week 0

and this

;; This is not 'murrica
{:start-of-week 0}

and there is no change, even after restarting. 0.9.13. on Arch linux.

Make sure it is not already in the config file somewhere else.
In the current iteration of the config file it is already added.
This is what it looks like for me:

 ;; Specify the date on which the week starts.
 ;; Goes from 0 to 6 (Monday to Sunday), default to 6
 :start-of-week 0

With 0, this is what my /date-picker looks like on Android:

2 Likes

Thank you, that fixed it for me! I didn’t expect to be set in there, too.

1 Like