1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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

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

    Ian Haney Banned

    Likes Received:
    Best Answers:
    Trophy Points:
    Ian Haney, Jun 23, 2020 IP