Results 1 to 1 of 1

Thread: flatpickr first day of week Monday and shorthandcurrentMonth

  1. #1
    Join Date
    May 2012
    Posts
    217
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default flatpickr first day of week Monday and shorthandcurrentMonth

    I have started to use flatpickr on a form and it's working but want to add couple of options to it. I want to add the firstDayOfWeek so that Monday is the first day of the week and then want to shorthandCurrentMonth so it shows Jun instead of June

    I know the option code I have is sort of working as dateFormat: "d-m-Y", works if I change the date format and it shows the date format I alter in the dateFormat line but unsure why the firstDayofWeek and shorthandCurrentMonth is not working, below is the code I have

    Code:
    <input name="date" id="flatpickr" placeholder="Choose a Date" class="form-control">
    
    <script>
    var example = flatpickr("#flatpickr", {  
    // A string of characters which are used to define how the date will be displayed in the input box.
    dateFormat: "d-m-Y",
    // Show the month using the shorthand version.
    shorthandCurrentMonth: true,
    "locale": {
        "firstDayOfWeek": 1 // start week on Monday
    }
    });  
    </script>
    Update: Just got it working by using the cdn files as mentioned on https://www.cssscript.com/flat-style...ker-flatpickr/ as was originally using the code from them files but might be conflicting with something the way I did it originally or coding was possibly missing
    Last edited by ianhaney; 06-23-2020 at 01:28 PM.

Similar Threads

  1. Replies: 0
    Last Post: 10-30-2013, 06:53 PM
  2. Rid the world of ie6 in a week
    By bernie1227 in forum The lounge
    Replies: 0
    Last Post: 07-15-2012, 04:58 AM
  3. Load new page on monday of each week
    By greenday45 in forum Looking for such a script or service
    Replies: 6
    Last Post: 04-11-2007, 04:16 AM
  4. Different page for each day of the week
    By Gloudo in forum JavaScript
    Replies: 0
    Last Post: 01-24-2006, 07:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •