flatpickr first day of week Monday and shorthandcurrentMonth

Discussion in 'JavaScript' started by Ian Haney, Jun 23, 2020.

  1. #1
    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


    <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>
    Code (JavaScript):
     
    Ian Haney, Jun 23, 2020 IP
  2. Ian Haney

    Ian Haney Banned

    Messages:
    131
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    78
    #2
    Ian Haney, Jun 23, 2020 IP