Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7539845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:29:23+00:00 2026-05-30T07:29:23+00:00

I am using the jQuery datepicker to request date input from the user. I

  • 0

I am using the jQuery datepicker to request date input from the user. I have set the local defaults and have it producing the correct date format that I want (dd/mm/yyyy). For some reason this date is posted in the form (mm/dd/yyyy) – how do I ensure that the correct format is posted?

Setting up the defaults:

jQuery(function($) {
    $.datepicker.regional['en-GB'] = {
        monthNames: [
            'January',
            'February',
            'March',
            'April',
            'May',
            'June',
            'July',
            'August',
            'September',
            'October',
            'November',
            'December'
        ],
        monthNamesShort: [
            'Jan',
            'Feb',
            'Mar',
            'Apr',
            'May',
            'Jun',
            'Jul',
            'Aug',
            'Sep',
            'Oct',
            'Nov',
            'Dec'
        ],
        dayNames: [
            'Sunday',
            'Monday',
            'Tuesday',
            'Wednesday',
            'Thursday',
            'Friday',
            'Saturday'
        ],
        dayNamesShort: [
            'Sun',
            'Mon',
            'Tue',
            'Wed',
            'Thu',
            'Fri',
            'Sat'
        ],
        dayNamesMin: [
            'Su',
            'Mo',
            'Tu',
            'We',
            'Th',
            'Fr',
            'Sa'
        ],
        dateFormat: 'dd/mm/yy', 
        firstDay: 1,
        renderer: $.datepicker.defaultRenderer,
        prevText: 'Prev', 
        prevStatus: 'Show the previous month',
        prevJumpText: '<<', 
        prevJumpStatus: 'Show the previous year',
        nextText: 'Next', 
        nextStatus: 'Show the next month',
        nextJumpText: '>>', 
        nextJumpStatus: 'Show the next year',
        currentText: 'Current',
        currentStatus: 'Show the current month',
        todayText: 'Today',
        todayStatus: 'Show today\'s month',
        clearText: 'Clear',
        clearStatus: 'Erase the current date',
        closeText: 'Done',
        closeStatus: 'Close without change',
        yearStatus: 'Show a different year',
        monthStatus: 'Show a different month',
        weekText: 'Wk',
        weekStatus: 'Week of the year',
        dayStatus: 'Select DD, M d',
        defaultStatus: 'Select a date',
        isRTL: false
    };
    $.datepicker.setDefaults($.datepicker.regional['en-GB']);
});

Initialising the datepicker

    $(".datepicker").each(function () {
        $(this).datepicker({
            onSelect: onSelectHandler
        });
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:29:24+00:00Added an answer on May 30, 2026 at 7:29 am

    You should just need to do this:

    $( "#datepicker" ).datepicker({ dateFormat: 'dd-mm-yy' });
    

    Check out this simple jsFiddle demo.

    EDIT: Looks like your code works for me. Made a new fiddle with your code. Also, you don’t need to do a .each(). Just $(“.datepicker”).datepicker({onSelect: onSelectHandler}); should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the JQuery DatePicker to have the user pick a date and have
I'm using the jQuery datepicker where I have two textboxes (start date / end
I'm using the jQuery datepicker from jqueryui.com and I have a problem changing the
I am currently using jquery ui datepicker for forms that have date inputs. The
I am using jQuery datepicker, I have two datepicker input fields, like following: <html>
I am currently using this JQuery datepicker from http://www.eyecon.ro/datepicker/ . I have looked through
How to enable date manual input using jQuery UI Datepicker 1.8.4? I can input
I am using the jQuery datepicker on a text input field and I don't
I am using the jQuery datepicker( http://keith-wood.name/datepick.html ) and I would like to set
I am using the jquery ui datepicker in my app. I have created an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.