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 8852119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:19:16+00:00 2026-06-14T13:19:16+00:00

I am using this script: http://jdpicker.paulds.fr/?p=doc It’s a great datepicker, but of course, the

  • 0

I am using this script: http://jdpicker.paulds.fr/?p=doc
It’s a great datepicker, but of course, the guy didn’t add “mm/dd/YYYY” as one of the formats.

He claims “You can modify or add some new options by editing the switch located between lines 71 and 109. You just need to use a few regexp and some brain cells !” – well, i’m not the best with regex and I can’t get this working right.

My code:

case "mm/dd/YYYY": 
this.reg = new RegExp(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/); 
this.date_decode = "new Date(parseInt(matches[2]-1), matches[3], matches[1]);"; 
this.date_encode = 'this.strpad(date.getMonth()+1) + "/" + this.strpad(date.getDate()) + "/" + date.getFullYear();';
this.date_encode_s = 'this.strpad(date.getMonth()+1) + "/" + this.strpad(date.getDate())';
break;

This was an example of a working, YYYY/mm/dd format:

case "YYYY/mm/dd": 
default: 
this.reg = new RegExp(/^(\d{4})\/(\d{1,2})\/(\d{1,2})$/); 
this.date_decode = "new Date(matches[1], parseInt(matches[2]-1), matches[3]);"; 
this.date_encode = 'date.getFullYear() + "/" + this.strpad(date.getMonth()+1) + "/" + this.strpad(date.getDate());'; 
this.date_encode_s = 'this.strpad(date.getMonth()+1) + "/" + this.strpad(date.getDate());'; 
break;

Even after modeling after this, I couldn’t get it to work. It formats the date properly, but ends up changing the calendar to the year 2038 for some reason. Any help would be great!

  • 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-06-14T13:19:17+00:00Added an answer on June 14, 2026 at 1:19 pm

    I think you need to change this line:

    this.date_decode = "new Date(parseInt(matches[2]-1), matches[3], matches[1]);";
    

    to this:

    this.date_decode = "new Date(matches[3], parseInt(matches[1]-1), matches[2]);";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One guy tried to exploit it using this script http://www.searchr.us/web-search.phtml?search=%22%3E%3Cscript%3Ealert%28String.fromCharCode%2872%29+String.fromCharCode%28105%29%29;%3C/script%3E How do i stop
I have been using this script ( http://www.dynamicdrive.com/dynamicindex6/dhtmlcount.htm ) for countdown to vacations. But
Hi I have been trying to get this script http://jsbin.com/ipajo5/ working but using .live()
well im using this script right here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ and I have a multiMonth plugin
I'm using this java script library to show ratings http://www.fyneworks.com/jquery/star-rating/#tab-Overview . I'm using below
When using this code: <script> $(document).ready(function () { $.getJSON(http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?, function(data) { if(data[0].text.length > 107)
I'm using this code: <script> $(document).ready(function () { $.getJSON(http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?, function(data) { $(.show_tweet).html(data[0].text); }); });
im using a simple test script from http://www.tuxradar.com/practicalphp/8/11/0 like this <?php $fp = fopen(foo.txt,
I am using this script: http://wpaoli.building58.com/2009/09/jquery-tab-slide-out-plugin/ It works well but my problem is that
We're using this script -- http://jsfiddle.net/6t74T/4/ -- which we learned about in this terrific

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.