# Change first day of week on datepicker

**URL:** <https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539>\
**Category:** Dashboard\
**Created:** [8 November 2020 03:40 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539 "2020-11-08T03:40:07Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mischkasmith](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mischkasmith/32/31586_2.png) [@mischkasmith](https://discourse.nodered.org/u/mischkasmith)\
**Post date:** [8 November 2020 03:40 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/1 "2020-11-08T03:40:07Z")

</div>

Hello.  
Does anyone know how to change the first day of the week in the datepicker node?  
The week should start on monday and not on sunday.

![Bildschirmfoto vom 2020-11-08 04-41-50](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/6/36f148ef7f0797c76f39d70d4d3b7caf1a531175.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 November 2020 07:20 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/2 "2020-11-08T07:20:43Z")

</div>

I am not certain but I think that is up to the browser. Try googling for Firefox change first day of week, or whichever browser you are using.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 November 2020 15:29 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/3 "2020-11-08T15:29:48Z")

</div>

Or it may be down to the OS. What locale are you using?

---

<div class="post-metadata">

**Author:** ![mischkasmith](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mischkasmith/32/31586_2.png) [@mischkasmith](https://discourse.nodered.org/u/mischkasmith)\
**Post date:** [8 November 2020 15:42 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/4 "2020-11-08T15:42:16Z")

</div>

This is the same on all devices. I use windows, linux and android.  
Locale is set to german in the OS and in the browser.  
In node-red i set it also to german in the dashboard settings.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [8 November 2020 15:44 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/5 "2020-11-08T15:44:15Z")

</div>

hold that thought....

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 November 2020 16:01 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/6 "2020-11-08T16:01:32Z")

</div>

> [@Colin](#):
>
> I think that is up to the browser

Having researched this I think I am wrong, I thought it was in the browser, but I was getting mixed up with Thunderbird.

---

<div class="post-metadata">

**Author:** ![mischkasmith](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mischkasmith/32/31586_2.png) [@mischkasmith](https://discourse.nodered.org/u/mischkasmith)\
**Post date:** [8 November 2020 17:14 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/7 "2020-11-08T17:14:07Z")

</div>

In the moment documentation i found this, but i dont know who to inject this code.

[https://momentjs.com/docs/#/customization/dow-doy/](https://momentjs.com/docs/#/customization/dow-doy/)

But generally I think that the language is not correctly adopted from the browser.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 November 2020 18:03 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/8 "2020-11-08T18:03:53Z")

</div>

Not sure why you are looking at MomentJS? That has nothing to do with the datepicker.

> **[AngularJS Material](https://material.angularjs.org/latest/api/directive/mdDatepicker)**

---

<div class="post-metadata">

**Author:** ![mischkasmith](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mischkasmith/32/31586_2.png) [@mischkasmith](https://discourse.nodered.org/u/mischkasmith)\
**Post date:** [8 November 2020 18:15 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/9 "2020-11-08T18:15:42Z")

</div>

Because the hint in the help of the datepicker node.  
 ![Bildschirmfoto vom 2020-11-08 19-12-22](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1ccdd3f1023f4261897d7f556d771e238665be2b.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 November 2020 22:04 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/10 "2020-11-08T22:04:10Z")

</div>

I believe that is just for changing the way the date is displayed in the field, it will not change which day is shown as the start of the week in the calendar popup.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/8041ead7554d3e5ce3a86f581bd3bf2b2f71e46a.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [8 November 2020 22:15 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/11 "2020-11-08T22:15:30Z")

</div>

yes - needs some internal plumbing added so we can get to `$mdDateLocale.firstDayOfWeek`.  
Now in master branch.

---

<div class="post-metadata">

**Author:** ![mischkasmith](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mischkasmith/32/31586_2.png) [@mischkasmith](https://discourse.nodered.org/u/mischkasmith)\
**Post date:** [9 November 2020 23:00 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/12 "2020-11-09T23:00:23Z")

</div>

Thank you for the integration.

I don't want to nag, but I think the problem is more due to the fact that the language is not passed correctly. In the `app.min.js` all the specifications for the different locales are already defined.  
Is there a possibility to activate it. this may also affect other nodes.

 ![Bildschirmfoto vom 2020-11-09 23-58-11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/7/678d0318fbd4fe095cecd3899c9c88fcff60e93a.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 November 2020 23:02 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/13 "2020-11-09T23:02:27Z")

</div>

Where exactly are you looking ? By all means offer up a pull request.

---

<div class="post-metadata">

**Author:** ![mischkasmith](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mischkasmith/32/31586_2.png) [@mischkasmith](https://discourse.nodered.org/u/mischkasmith)\
**Post date:** [9 November 2020 23:06 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/14 "2020-11-09T23:06:44Z")

</div>

search for `M.defineLocale` in node-red-dashboard/dist/js/app.min.js

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 November 2020 23:17 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/15 "2020-11-09T23:17:42Z")

</div>

ok will have a look

Better fix pushed - now picks it up automatically from that field. Thanks for finding it.

---

<div class="post-metadata">

**Author:** ![mischkasmith](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mischkasmith/32/31586_2.png) [@mischkasmith](https://discourse.nodered.org/u/mischkasmith)\
**Post date:** [10 November 2020 00:01 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/16 "2020-11-10T00:01:27Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 December 2020 00:01 UTC](https://discourse.nodered.org/t/change-first-day-of-week-on-datepicker/35539/17 "2020-12-10T00:01:27Z")

</div>

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