2

I have applied a jQuery calendar in my website, and it functions okay. However, the initial display format is Sun, Mon, Tue ... Sat, in which I would like to change to Mon, Tue, ... Sun.

Though I have modified all "Sunday", "Sun", "Su" in all locations within the site and the header of the calender works well, however, the arrangement of the date blocks are still as if Sunday is at the beginning...

Actually, what else I have to do inorder to correct it? Thanks a lot.

(Please note Apr 1 is sunday and should be located at the last column)

Calendar

3
  • see the documents of plugin your are using to display the calendar. or give us the link of calendar plugin Commented Apr 25, 2012 at 6:32
  • * jQuery UI 1.8.17 * * Copyright 2011, AUTHORS.txt (jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * jquery.org/license * * docs.jquery.com/UI Commented Apr 25, 2012 at 6:37
  • Post the code you're using to make this calendar. Commented Apr 25, 2012 at 6:48

2 Answers 2

2

You will see in the documentation here that you can set option first day

$( ".selector" ).datepicker({ firstDay: 1 });

Sunday is 0, Monday is 1

Cheers

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, does it mean I have to change all firstDay: 0 to firstDay: 1 within the whole site, and no need to make other changes? Thanks!
@Ham yes instead of $( ".selector" ).datepicker(); for initialization use $( ".selector" ).datepicker({ firstDay: 1 });
0
put this code in your jquery datepicker function where you define defaults
dayNamesMin:[ 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']
 if not then try this one 
 dayNamesShort:[ 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat','Sun']

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.