umer-astutesol / jquery-frontier-calendar

Automatically exported from code.google.com/p/jquery-frontier-calendar
0 stars 0 forks source link

Date jump to January crashes calendar #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Click to show Datepicker 
2. select any date in month of January
3. watch the horror

What is the expected output? What do you see instead?

Expected output is for calendar to show month January; instead, the calendar 
goes to two weeks and crashes.

What version of the product are you using? On what operating system?

Calendar Version: 1.3.2
PC OS: Win 7
Browser tested: IE 8

Please provide any additional information below.

fix is as follows:
 in showMonth function (~line 4008 of un-minified .js file)
wrap the code to strip preceding zeros with:
     if (month.length > 1) {
          // strip any preceeding 0's
          month = month.replace(/^[0]+/g, "");
     }

Original issue reported on code.google.com by ryan.uhl...@gmail.com on 17 Mar 2011 at 8:31

GoogleCodeExporter commented 8 years ago
Thanks for the fix, it was a real pain in the ass :) You saved my life. Or my 
job. Well, both :)

Original comment by dansen...@gmail.com on 12 May 2011 at 1:37

GoogleCodeExporter commented 8 years ago
Note that the above fix will not work if the user is padding their month 
parameter with an extra "0" (ie "00").  A better fix would be:

if (parseInt(month) > 0) {
  // strip any preceeding 0's
  month = month.replace(/^[0]+/g,"");
}

Original comment by dave.pederson on 6 Dec 2011 at 8:03

GoogleCodeExporter commented 8 years ago
thank u very much for help ...it s work very nice

Original comment by marouane...@gmail.com on 13 Feb 2012 at 3:51

GoogleCodeExporter commented 8 years ago
I can confirm that Dave's solution (Comment #2) worked.

A small point but the lines to replace are 4006 and 4007 in version 1.3.2

Original comment by e...@lemurheavy.com on 8 Mar 2012 at 9:04

GoogleCodeExporter commented 8 years ago
i have tried the above code for january month but still i am getting same 
output....
please help me out as early as possible
and i am using DNN

Original comment by mishramu...@gmail.com on 30 Aug 2013 at 6:12

Attachments: