A problem occured while loading the plugin: krl_flickr_photoset -> : Assigning the return value of new by reference is deprecated on line 18
kelvinluck.com: jQuery date picker
Get Firefox! creative commons

jQuery date picker

This jQuery plugin allows you to easily add “date picker” calendars to you HTML forms. These calendars make it much quicker, easier and less error prone for people to input certain types of dates.

For a working example, more information and download please check out this page

  1. hey! awesome work on that Jquery calendar picker!

    if you could select a time with it… then i would say it’s complete :-)

    any thought on that? i’d be happy to test, i want to integrate that into Drupal as a new module to get rid of the clunky JSCalendar class


    ted    Aug 25, 19:18    #
  2. Hi ted,

    Thanks for the feedback. Unfortunatly at this time I’m not planning to add a time picker to the date picker simply because most use cases I can think of for a date picker don’t also need a time picker. I feel it would be better implemented as a seperate plugin…

    Cheers,

    Kelvin :)


    Kelvin Luck    Aug 29, 11:32    #
  3. Hi! Thanks for the great plugin! Is it possible to show days outside the current month, eg. last few days of previous month and first few days of next month


    Brad Vincent    Sep 4, 09:43    #
  4. Hi,

    Glad you like it :)

    It isn’t possible to show the days outside the current month without modifying the core code. I’m busy with other stuff at the moment but will put this on the “todo” list,

    Cheers,

    Kelvin :)


    Kelvin Luck    Sep 4, 09:59    #
  5. Like the simplicity of your plugin.

    If you get a chance to add a time picker I’d definately switch to your plugin over my current date plugin DHTMLCalendar


    — John H    Sep 19, 20:47    #
  6. thanks for contributing this great plugin to the community, and thanks for not bloating it up with unneccessary features!


    Bryan Buchs    Sep 20, 13:52    #
  7. Hi, very nice plugin… exactly what I needed! Except I can’t get the calendar to popup. I’m getting the calendar icon to appear… and have initialized the calendar by following your directions but nothing yet. I’ve tried the posted source and the source from svn. Any ideas?


    Matt    Sep 26, 11:05    #
  8. Cool plugin. I have my input box to the right of the screen, when I click the calendar icon the calendar opens to the outside of the window’s viewport. How can I reposition the calendar so it is to the left of the input box.


    Mike Holloway    Sep 26, 15:26    #
  9. Hi guys,

    Glad you like it…

    @Matt – does it work on my demo page for you? What browser / os are you using?

    @Mike – I plan to add in some code to a future version which will automatically make sure the calendar is visible. For the meantime you will need to edit the CSS for div.popup-calendar (line 64 of styles.css). Unfortunately you will also have to edit the JS for IE – see line 197 of datePicker_source.js

    Cheers,


    Kelvin Luck    Sep 26, 18:17    #
  10. Yes it does work on the demo page!? I’m using Safari and Firefox. Any ideas?

    – matt
    Matt    Sep 27, 04:04    #
  11. Hmmmmm – no!

    Have you got a version of your test page online somewhere I can see? Have you put all the CSS and JS on your site?

    Cheers,


    Kelvin Luck    Sep 27, 08:10    #
  12. Hi Kelvin,

    Cheers for that, it works better if you take line 197 out and then feed IE6 a specific style for the ‘right’ (as opposed to left) position using conditional comments :)


    Mike Holloway    Oct 3, 13:44    #
  13. Hi Mike,

    Good idea. Like I mentioned above, when I get a chance I’m going to look into making the calendar position itself more intelligently and hopefully at that time I can figure out why IE is misbehaving…

    Cheers,


    Kelvin Luck    Oct 3, 19:12    #
  14. Its looking great.

    Also, it may be a good idea to allow for year switching as well.


    — Daniel Hopper    Oct 5, 17:14    #
  15. hi, first sorry for my english, really is to bad.

    if i want too preselect a date (for example if the date is provided from a database), i put the date in input field, but if the date is one or more months older than actual month it does not work.

    how to preselect any date…?


    Leandro Asrilevich    Oct 14, 09:05    #
  16. Hi,

    You should be able to preselect any date but if you want the date to be in the past you need to make sure you have passed in a startDate in the past when you initialise the date selector,

    Hope that helps,


    Kelvin Luck    Oct 14, 10:00    #
  17. was playing around with your date selector. love it but it didn’t do every thing that I wanted (allow dates in the past, allowed user to jump forward/backwards in year increments) so I modified your source file email me and I’ll supply you the changed file which you can then diff.

    thanks for such a easy way of adding date functionality to a web site.


    Adrian Sweeney    Oct 17, 11:43    #
  18. Hi Adrian,

    Thanks for the feedback. It’s a common misconception that the date picker doesn’t let you pick dates in the past but you easily can by passing in a suitable ‘startDate’. I need to update the demo pages when I get a second so there is one that makes this more explicit.

    I’ll get in touch with you re. seeing your changes for the year increments and will think about integrating them when I get a second (very busy at the moment!),

    Glad you like the date picker,

    Cheers,


    Kelvin Luck    Oct 18, 21:03    #
  19. Great plugin, does exactly what I need. Thanks!

    I also need a calendar to embed into a page to provide navigation around an events listing. Is it possible to embed the datepicker’s calendar straight into a page, by passing the input box?


    — Jon    Oct 25, 15:57    #
  20. Any chance you could extend the plugin to be able to disable days? For instance, disable all saturdays and sundays, or disable the first wednesday of each month? I think that would really help make it more customizeable.


    refactored    Nov 1, 08:38    #
  21. could not figure it out myself but it would be nice if the iframe was created with the propperties frameborder=0 something like $.IFRAME); so that the css still validates meaning not have to use the filter:mask();


    — john Slisbaum    Nov 2, 12:40    #
  22. Hi guys,

    @Jon – At the moment it doesn’t work like that but I’ll consider it when I next get a chance to do some work on the plugin (which won’t be for a couple of weeks at least!)

    @refactored – Good suggestion but unfortunately the same answer as to Jon – I’m too busy at the moment to implement it but will try to ASAP.

    @john – Another good suggestion and one that’s already on the TODO list. The IE no select hack should be added in with JS rather than being in the stylesheet and this will be done when I next work on the plugin…

    Thanks for the feedback everyone, sorry I don’t have the time right now to integrate the ideas…


    Kelvin Luck    Nov 2, 20:26    #
  23. Hi. This is fantastic!

    I’m wondering though, how to get the value of the input field after the date is chosen from the picker.

    thanks!


    — Jud B.    Nov 13, 22:49    #
  24. BTW, I can access the field using “onchange” but only if I type the date in. I would like to know what the event call is after choosing a value from the datePicker.

    Thanks!


    — Jud B.    Nov 13, 22:53    #
  25. Hi, glad you like it :)

    It depends what you want to do with the value in the input field. The normal usage would be to submit the form and then the date will be available to your serverside script.
    Or you could grab the date back out using jQuery and do something with it:

    $(’#your-input-id’).val()

    Should do it…

    Hope this helps,

    Kelvin :)


    Kelvin Luck    Nov 13, 22:54    #
  26. Heh. Basically, I’m trying to use an AJAX call to update a text area field w/ database content. That DB content requires a date parameter and so I wanted to use the datePicker. :)

    Right now, if a user types in the date (11/14/2006), then the “onchange” event calls the JS function which makes the AJAx request to the db and then displays it in the text area.

    This then allows the user to proofread or edit the text for that chosen date. Once approved or changed, then they hit submit and updates the DB.

    So, really I guess what I need to know is if there is an event handler for the datePicker.

    Thanks for any help! :)


    — Jud B.    Nov 13, 23:09    #
  27. Hi Jud,

    Sorry – I misunderstood you originally… Now that I understand you I just did a quick change to the date picker source which makes sure that the INPUT’s onchange event is triggered when a date is selected. Check out the plugins page again to grab the update (note that the packed version isn’t up to date because Dean Edwards packer is currently unreachable).

    Hope this helps,

    Kelvin :)


    Kelvin Luck    Nov 13, 23:13    #
  28. Fantastic! Thank you so very much for going out of your way to do this!

    I’m sure there are other devs who’re going to love this!


    — Jud B.    Nov 13, 23:17    #
  29. hey! Love this calendar! Works great, but I don’t see the icon. Using IE6 on XP.

    Does it matter if I have the icon in an images folder? I’ve modified the CSS to: images/calendar.png, but it’s not showing. any ideas?


    — kevin    Nov 15, 22:43    #
  30. Hi :)

    It doesn’t matter where the calendar image is, you just need to make sure it is referenced correctly in the CSS . Bear in mind that the path to the image in the CSS is relative to the CSS file, NOT the HTML file.

    Hope that helps,


    Kelvin Luck    Nov 16, 07:43    #
  31. I do have the correct path to the images because when I remove “no-repeat” it appears. Also, I don’t have a link when I publish the file online. Offline, there’s still no icon, but at least I can hover in the right area, see the cursor change and click. Online, none of that. Any ideas?


    — kevin    Nov 16, 11:44    #
  32. Hmmmm – I’m afraid I’ve got no ideas. It sounds like something in your CSS is clashing with something in the calendar CSS… Is your calendar field in a table cell? Someone else had some issues with that – does that help you at all?

    Cheers,


    Kelvin Luck    Nov 16, 20:03    #
  33. I’m sure it’s a CSS error so I’ll have to tinker with it. It’s not in a table (I don’t use them anymore! :D )

    Thanks again!


    — kevin    Nov 16, 20:30    #
  34. Hi Kevin,

    great plugin, ive included in a open sourec app im working on (www.simpleinvoices.org), just wondering are there any plans to add an option to move forwared/backwards by years as well as months

    Cheers

    Justin
    justin@kelly.org.au


    justin    Nov 17, 03:27    #
  35. jquery datepicker: I’d like the starting day of the week to be configurable. Here in europe it’s rather monday than sunday. Otherwise great ;-)


    — Emilio    Nov 17, 16:32    #
  36. Hi guys – thanks for the feedback…

    I’m hoping to do some work on the plugin at some point soon and will definitely integrate the week start request. I’m still personally not sure if the jump by years functionality belongs in the plugin but it has been requested many times so I’ll try and add it in…

    Cheers,


    Kelvin Luck    Nov 18, 21:30    #
  37. Hi Kelvin

    I am adopting jQuery as my JS Framework and would love to use your calendar for the booking forms on my site. However, I am forced to use 3 select fields for the date (1 each for day, month and year) because it submits through to a 3rd party reservation system. I was wondering if your date picker could be configured to work using select fields like mine?

    Thanks
    Mike


    Mike    Nov 21, 14:54    #
  38. Hi Mike,

    It’s not currently possible to do that with the date picker. It would be a nice feature though and I’ll stick it on the TODO list for when I next get a chance to work on it,

    Cheers,


    Kelvin Luck    Nov 22, 22:11    #
  39. Hiya all,

    I too am loving this plugin – there is, however, one issue I’m trying to solve and maybe I’m just not looking well enough. I’m hoping you can help me on this one.

    When I apply the date selector to an input, the size of the input (which is padded in my layout) resets and – being a perfectionist – I was wondering if there’s any way of keeping exisiting styles. I’ve looked into the CSS and deleted every line where it says padding: 0 or margin: 0 and (surprisingly) not much happened.

    Any ideas would be greatly appreciated ;)


    — Arthur    Dec 3, 22:47    #
  40. Here’s a vote for keeping the plugin lightweight and not adding too much features.

    A bit related to lightweight: paging months is a bit “sluggish”. Any ideas on how to improve the speed of _getCalendarDiv()?


    — Anders    Dec 4, 13:04    #
  41. @Arthur – glad you like the plugin and contacted me direct to let me know you figured it out and started editing the right CSS!

    @Anders – glad you agree about keeping the plugin lightweight. Not sure why it feels sluggish to you – I guess we could investigate creating the calendar popup once and then updating the fields within it rather than recreating it from scratch each time but I’m not sure this will help…


    Kelvin Luck    Dec 4, 17:28    #
  42. I used the brand new Firebug 1 beta “Profile” feature, which showed that both changeMoth and _getCalendarDív averaged around 150ms. I’m not sure if you add them or not to get the “real” value. Anyhow, when clicking fast through the months, I can clearly feel a lack of responsiveness, it’s not huge, but still there. I compared that with the google calendar version which feels more responsive, and it seems to average around 30ms (not so obvious there which functions are being called).


    — Anders    Dec 4, 18:41    #
  43. Nevermind the thing about adding the two times, it’s of course only one that counts as changeMonth calls getCalendarDiv…


    — Anders    Dec 4, 20:33    #
  44. I’ll try and take a look into speeding up _getCalendarDiv when I next get a chance to work on the datePicker and I’ll take a look at how the google calendar one does it (btw – where can I see that?),

    Cheers,

    Kelvin :)


    Kelvin Luck    Dec 5, 17:36    #
  45. http://google.com/calendar -> “Create event” :)


    — Anders    Dec 6, 05:16    #
  46. Cheers :)


    Kelvin Luck    Dec 6, 07:37    #
  47. Any chance we could have multiple dates selection?

    Right now, I am using Dynarch Horizontal Menu which does that.

    I //would love// dropping this library and use only jQuery. But I need this functionnality.

    Your plugin is awesome and I would replace hmenu right now if I could.

    I have to thank you. Not only is it very useful, but I learned a lot with it. Thanks again.


    — Laplix    Dec 27, 20:30    #
  48. Hi,

    I guess you mean the Dynarch Calendar (not menu)?

    There are a number of improvements I have planned for the date picker but to be honest I think multiple date selection will be at the bottom of the list…

    The problem is that it is quite a fundamental change as a date picker is currently by definition attached to one INPUT field and it would be an issue adding multiple dates to one field…

    If there are enough requests for it (and I get enough time!) then I will consider adding it though…

    Glad you like the plugin,

    Kelvin :)


    Kelvin Luck    Dec 28, 08:43    #
  49. This is indeed a great datepicker. I would also like to put in a request in for a way to embed the calendar in the page, instead of popping up.

    Keep up the great work!


    William    Jan 10, 13:19    #
  50. A superb date picker and easy to customise. It saved me a large javascript headache with some legacy code. If you want to style the inactive table cells further you may have to change the empty string to a non-breaking space so IE renders it properly.


    — Dan Moran    Jan 12, 14:58    #
  51. Hi Kelvin, I use your nice stuff on a site.
    But (maybe you know) it doesn’t work with the new 1.1 beta version of jquery.


    — Gyulus    Jan 13, 16:22    #
  52. I’ve ben using jscalendar, and then I recently discovered jquery and would love to consolidate all of my disparate js effects and tools into the framework. Is there any chance that there will be an update to datePicker in the near future? I’m looking specifically for a couple of features that have already been mentioned:
    -move by year (via dropdown for distant year values)
    -optional time selection

    jscalendar has a boatload of additional features, but the ones that I’d be hoping for are:
    -more configuration options for returned date/time format
    -allow user to move the DIV


    — zach    Jan 15, 08:36    #
  53. Hi Kelvin!
    I hope, soon you will update your great datepicker to work with the new 1.1 version of JQuery.


    — Gyulus    Jan 15, 09:56    #
  54. datePicker appears not to work against jquery 1.1.


    Brett Carter    Jan 16, 00:38    #
  55. Hi. Great date picker.

    However, it may have broken for jQuery 1.1

    I’m trying to use it with the latest jQuery and I get the following error:

    _firstDate has no properties

    on line 79 in uncomprssed datePicker.js

    I haven’t looked too closely for the reason, as I still not too sure what to look for in jQuery :) But the problem is there :(


    Dmitrii 'Mamut' Dimandt    Jan 17, 09:11    #
  56. Is it compatible with jQuery 1.1?


    jazzle    Jan 19, 12:53    #
  57. I’ve just updated the date picker and it is now compatible with jQuery 1.1 (I had to work around a bug in the jQuery core),

    Cheers,


    Kelvin Luck    Jan 21, 20:44    #
  58. you can’t chain methods on the datepicker after setup, since its not following JQuery conventions. a ‘return this’ fixes this:

    diff—git a/s/jd.js b/s/jd.js
    index ec3ecab..d5b163f 100644—- a/s/jd.js
    +++ b/s/jd.js
    @ -407,7 +407,7 @ jQuery.fn.datePicker = function(a)

    jQuery.datePicker.setInited(this); } }); – +return this; };
    carmen    Jan 22, 02:18    #
  59. In IE7, if you pick the left picker on the demo page, the input fields shows through the calendar.


    — Olivier Jacquet    Jan 23, 14:13    #
  60. Thank you for the new version!
    You forgot to update the LastChangedDate field in the source:
    $LastChangedDate: 2006-11-26 17:52:59 +0000 (Sun, 26 Nov 2006) $


    — Gyulus    Jan 23, 18:09    #
  61. @carmen & Gyulus – thanks for the headsups, I’ve now added these in.


    Kelvin Luck    Jan 23, 18:46    #
  62. Hi Kelvin,

    i would too love the “multiple dates” functionality: it’s very useful for theatres and cultural places, where content administrator needs to enter all the dates for one show. in fact, you would use the calendar to fill in the value for a hidden input field, returning a string with all dates separated by, say, a semicolumn.


    Alexandre Plennevaux    Jan 28, 16:55    #
  63. I think that have a bug when serving jquery date-picker as xhtml (xhtml1-strict with php headers). header(“Content-Type: application/xhtml+xml; charset=utf-8”); Firebug 1.0 return: An invalid or illegal string was specified” code: “12” Serving as text/html dont´t have problem… Tks for excelent script!


    — Jacques    Jan 28, 18:00    #
  64. Hi Kelvin,

    Great plugin. I ran across an issue with setting the start date:

    $(’#date_chooser_date’).datePicker({startDate:’11/11/2006’});

    For whatever reason, the start date is ignored, and any start date is selectable

    thanks,

    Mike


    Michael Caplan    Jan 29, 18:10    #
  65. Hi Kelvin,
    can you give an example to call selectDate(d, ele) on datePicker? I don’t which I should pass to ‘ele’ parameter


    — Fei Yang    Jan 31, 02:07    #
  66. Hi guys – thanks for the feedback.

    @ Alexandre – maybe this is a problem that could/ should be solved in the page. So once a date is selected an extra input field with datePicker is dynamically added to the page. Rather than adding code to deal with this directly into the plugin (which I want to keep lightweight)?

    @Jacques – this is probably because the calendar elements are created via jQuery which uses innerHtml which isn’t allowed in true XHTML. There was an interesting discussion about that on the jQuery mailing list today – the conclusion seems to be that the world isn’t yet ready for pages served as true XHTML.

    @Mike – I can’t replicate your problem. startDate sets the first selectable date. So the user should be able to select any date between that and endDate. Is this different to what you are seeing?

    @Fei Yang – I’m not sure what you are trying to do. That is an internal private method. If you want a different date to be selected in the pop up calendar simply put that date into the input field and it will automatically be selected in the calendar when the calendar pops up,

    Hope that all helps!


    Kelvin Luck    Feb 1, 19:47    #
  67. hi Kelvin!

    other question: i get the input date from mysql, which has a built in command for outputting it the way i need (date_format(mydate,’%d-%m-%Y’))
    but mysql does not have a built in function for formatting the date back to mysql format on INSERT/UPDATE.

    question: wouldn’t be useful that the plugin allows to set the input date format (dmy) and the output date format (Y-m-d) ?

    thanks for the great plugin !


    Alexandre Plennevaux    Feb 7, 11:42    #
  68. Hi Alexandre,

    Why not use:

    $.datePicker.setDateFormat(‘ymd’,’-’);

    (example from the “usage” section of the plugins page)?

    Hope that helps,


    Kelvin Luck    Feb 7, 21:37    #
  69. We’re trying to make the switch from jscalendar to this great jquery calendar. One big issue is that we need to limit the dates; more than just start and end dates. As in jscalendar, I want to be able to pass a custom function during the init and have it run when each day is being output to determine whether or not to show the date. That will allow arbitrary date selection criteria, such as every Thursday, no weekends, etc. I attempted to modify the code, but couldn’t get the function to be defined within the object (I’ve never written a jquery plugin before). Any ideas or help or plans for the future?

    Thanks,
    Mark


    — Mark Mazelin    Feb 8, 14:52    #
  70. Hi Mark,

    I really like the idea of an optional custom callback function which could be run for each date output. This would allow a great deal of extensibility without making the plugin too heavy… It could simplify the plugin itself as well by abstracting out some of the logic which is stuck in the dates loop. I’ll look into this when I next get a little bit of spare time…

    Cheers,


    Kelvin Luck    Feb 8, 18:29    #
  71. Kelvin,

    Thanks for the work you’ve done here.

    I have a setup where the user enters a start date and an end date. I’d like the end date calender to default to the month of the date set in the start date field (sorry if that’s confusing). This might have the same solution as mentioned above with adding a custom callback function. Is there a way to accomplish what I’m trying to do now?


    — Mike    Feb 8, 22:02    #
  72. Hi Mike,

    This is a normal use of the date picker and I would like to add some code to make it easier… At the moment I’m totally snowed under though :(

    In the meantime, you can listen for the “change” event on the first textfield and can use this event to copy the value from the first field into the second field. Then the second calendar will have the first chosen date selected when it’s first popped up…

    Hope that helps,

    Kelvin :)


    Kelvin Luck    Feb 12, 16:38    #
  73. Hi Kelvin.

    Great plugin! I just have a suggestion for it: check if the related input is enabled before opening the calendar. I made a patch like this on the show method:

    if ($(input).is(’:disabled’)) {

    return;
    }
    Nando Vieira    Feb 19, 22:28    #
  74. Hi Celsius, ummm, I mean Kelvin! :)

    Great date picker! Only one small problem: I can’t get a label text to appear in front of the input box. I must be missing something. Any ideas what?

    Thanks and regards from Slovenia


    — Mark    Feb 21, 09:36    #
  75. Hi Kelvin

    Having a problem with the datepicker which someone else mentioned previously but when you open the datepicker it shows through input boxes and table cells, this only happens in ie though (5.5, 6, 7) any ideas?

    Thanks, Tom


    — Tom Kentell    Feb 22, 08:22    #
  76. Hi Guys,

    @Nando – nice idea – I’ll add this in.

    @Mark – not sure I understand your problem… You mean you can’t figure out the CSS to get a label sitting infront of the input? Maybe because the input gets wrapped in a div class “date-picker-holder”?

    @Tom – Hmmm – you shouldn’t be having this problem. There is code in the plugin to prevent this happening. Do you see it on my demo page?

    Cheers,

    Kelvin :)


    Kelvin Luck    Feb 22, 10:08    #
  77. Hi,

    yes, I can’t figure out the CSS to get a label sitting infront of the input. Can you help me with this one? Pleeese!


    — Mark    Feb 22, 10:20    #
  78. Hi Kelvin, thanks for the quick response, i checked on the demo page and in IE your calendar is also being covered up by the text box, i think someone mentioned the problem before but dont think you answered it, its a problem which might not actually be fixable with the current setup on the page but if you can help it would be much appreciated, thanks, Tom.


    — Tom Kentell    Feb 22, 10:49    #
  79. Hi kelvin, have sorted the problem it was the containing div, had set zoom 1 to fix an issue with the height of a bar but that was causing the calendar to fall behind certain things but have fixed it now


    — Tom Kentell    Feb 22, 13:08    #
  80. Isn’t anyone else having this IE7 problem where the input text field shows through the calendar? Here it shows through for everyone.


    — Olivier Jacquet    Feb 22, 14:25    #
  81. Hi,

    @Mark – does maybe floating the label left help? Check out the styles on “date-picker-holder” – maybe you’ll need to tweak them too…

    @Tom – glad you figured it out – I was confused because it works fine in IE6 here…

    @Oliver – I haven’t got IE7 here so I’m not sure but the problem has been reported to me before. I thought someone had solved it but I can’t find the details at the moment. I’ll try and test on IE7 when I get a chance, in the meantime I’d appreciate any suggestions…

    Cheers,

    Kelvin :)


    Kelvin Luck    Feb 22, 15:54    #
  82. yes… custom callback sounds good. then we can create one for ISO8601 date format


    ccc    Feb 23, 20:06    #
  83. It’s a great plugin, thanks.
    if there is a year switching function would be better.

    would someone share this part before kelvin working on it?


    — ethan    Feb 26, 09:41    #
  84. Hello Kelvin,

    great work on the plugin, it won’t render properly in IE 6.0 on linux (IE4linux), it works great on firefox though…


    Joshua Angnoe    Feb 26, 12:15    #
  85. I would like to echo the earlier requests for multi-date selection capabilities.

    Great work!


    — Mr. Wilson    Feb 26, 19:14    #
  86. I am also having the issue in IE 6 and 7 where the calendar displays behind all other elements (in my case, behind select boxes, input elements, horizontal rules, EVERYTHING). Have tried mucking with z-indices, and nothing works. If necessary i can send over a reduced test case.

    Adrienne


    — Adrienne Travis    Feb 26, 20:55    #
  87. I had a problem with the calendar showing up perfectly at first, but as soon as I click next to change months the style changes and the Saturday column is partially missing. I’m using the Yahoo YUI fonts, resets and grids css plus some other css I’ve put together. I wouldn’t think it’s interfering, but maybe that’s the case. I jsut adjusted some font sizes, and padding etc and now it works. Any ideas?

    Great plugin—super simple!


    — font sizes and style etc    Feb 28, 19:21    #
  88. Hi guys,

    I can’t replicate any problems in IE6 on my test page on multiple machines here. Do you have a standalone version of IE6 running alongside IE7? I’m afraid I know nothing about IE6 on linux but I’d probably use firefox on linux anyway!
    Re. the style changes used alongside YUI fonts, resets and grids, I’m afraid I have no idea. I guess the CSS must be clashing in some way – if you have an example page I can take a quick look?

    Cheers,


    Kelvin Luck    Mar 1, 11:25    #
  89. Hi,
    Your date picker is great and so easy to install.

    Just noticed 2 problems.
    1) the linux problem (when you click fast) seems to be still there

    2) Could it be possible to have dropdowns to select month and year ? I need to select dates in the next year (2008).

    Good job.

    Chag


    — Chag    Mar 5, 21:10    #
  90. Hi Chag,

    Both of those issues are on the TODO list but it’s a question of finding time to do them! I’ll post here when I get round to it…

    Cheers,


    Kelvin Luck    Mar 6, 07:52    #
  91. Hi,
    I am facing a problem with IE6,a part of the calender date picker is displaying behind the dropdown control.Hope i am clear please slove my problem.


    — santy    Mar 6, 10:35    #
  92. Hi Santy,

    You are one of a number of people reporting the problem in IE6 but I can’t replicate it on any of the computers I’ve tried. What exact build of IE6 is it? Have you done a windows update recently or something? Is it happening on my demo page?
    Thanks for any help tracking this down,


    Kelvin Luck    Mar 6, 11:23    #
  93. Is it possible to use it without a date separator? I’m using a DB date-format like yyyymmdd with no separator. Seems it defaults to / when I try to specify blank.


    — Jon Henning Bergane    Mar 6, 18:28    #
  94. jon : look at the source, there’s a line a the beginning :
    dateSeparator = ”/”;
    try to remplace with
    dateSeparator = “”;


    — Chag    Mar 7, 15:56    #
  95. Dear Kelvin,

    Great plugin, thanks for contributing it!

    I have a feature request for startDate:
    allow values like ”+1” or ”-3” (today + 1 day or today – 3 days).

    Best regards,
    René


    — René Leonhardt    Mar 9, 14:41    #
  96. Dear Kelvin,
    I’ve a problem with your plugin when try to use it with niceJform plugin. When used together the small calendar link-image is on the right of textinput, but then the text input style is messed up. I figure out, that when I change in calendar css this:

    div.date-picker-holder input {float:left;}

    into this:

    div.date-picker-holder input {float:none;}

    the textinput looks fine. But the small image-link jumping down, below the textinput. Any help would be great!
    Best regards


    — Slawek    Mar 14, 23:21    #
  97. Hi Kelvin,

    I’m trying to use datePicker as a calendar only (allways opened, no date selection…). Do you know if there is some done work in this topic?

    Btw, I was experimenting the problem with IE about images and widgets that appear through the calendar (http://www.nocaduca.com/dp/test_datepicker.htm). I have testing (in firefox everything is ok) and i should take out a position:relative in the img.. but is this the point? I need that position:relative :(


    — xema    Mar 15, 11:25    #
  98. Hi again…

    I fixed the problem with IE taking the position:relative out, eventually.

    But in the former question (about using datePicker as a calendar), I can’t get by on showing the pop-calendar without throwing any event! Is it jQuery.datepicker.show(this)? this.datepicker.show()?... :(


    — xema    Mar 19, 16:57    #
  99. Hi xema, how did you manage to solve the problem with IE ? i have the same problem with images overlaping the calendar (in IE7). I have the problem on kevin’s test page too : http://kelvinluck.com/assets/jquery/datePicker/


    — Laurent Chardin    Mar 22, 13:26    #
  100. Actually, on kelvin’s test page, when i open the Date 1 calendar, i can see Date 2 input and image through it…

    I’m using IE7


    — Laurent Chardin    Mar 22, 16:09    #
  101. Hi,

    I finally managed to borrow a laptop with IE7 on it and fixed the IE7 “see through calendar” bug. Check the demo page and the source files (note that there were changes in the CSS as well as the JS files – see all changes here)...

    Cheers,

    Kelvin :)


    Kelvin Luck    Mar 23, 01:17    #
  102. Can it be modified to allow and start date in the past?


    — Shelane    Mar 24, 15:13    #
  103. Hi Shelane,

    I’m not sure I understand. You can pass whatever dates you like in for startDate and endDate (see the example on my page),

    Hope that helps,

    Kelvin :)


    Kelvin Luck    Mar 25, 14:12    #
  104. What I mean is that I’d like to not have to pass end a start date the way you don’t have to pass an end date to allow it to go on forever. I’m not sure how far back my users might need to enter information for (their birthday for instance). I suppose at worst I can go back 100 years.


    — Shelane    Mar 27, 15:34    #
  105. Hi Shelane,

    Ahh – I see. For me a much more common use case is in booking something (flights, tickets, whatever) where it is necessary to only be able to pick a date in the future. That is why I decided that no startDate means that today is the first available day.

    I don’t think the datePicker is a great tool for selecting birthdates or any other day far in the past or future (due to the amount of months you need to click through to get there) so I don’t think that a “no first date” ability would be that useful. As you say, you can pass in a date hundreds of years in the past which should be sufficient,

    Cheers,

    Kelvin :)


    Kelvin Luck    Mar 27, 15:52    #
  106. Dear Kelvin,

    I have the same showthrough issue with IE 6/Win and the current and previous datePicker version (datePicker laps over TinyMCE toolbar buttons), z-index didn’t work either.

    My feature requests:

    1) setChooseDateStr(newTitle).

    2) Hooks after _closeDatePicker() and before show().

    Best regards, greetings from Germany,
    René


    — Rene L.    Mar 29, 17:14    #
  107. Hi Kelvin! There is a bug in datePicker, concerned with ssl. If you access the site over https, at the time of the first use of calendar (first clicking on it), you get IE security alert “This page contains secure and non secure items”.
    Best regards,
    Oleg


    — Oleg Ovchinnikov    Mar 30, 14:58    #
  108. Hi,

    @René – thanks for the feedback. I’m currently specifying a new version of the date picker with the help of Jörn Zaefferer, Paul McLanahan and Brandon Aaron and will take these observations into account. It will be started from scratch and should hopefully add new functionality and clear any old bugs :)

    @Oleg – thanks for the report. I don’t currently have access to a https server so can’t test – could you edit line 198 of datePicker_source.js to read:

    if (false && jQuery.browser.msie)

    and let me know if you still get the error? (this will allow selects to shine through the date picker but I’d like to know if this block is causing the problems so I can take it into account for the new version),

    Thanks,

    Kelvin :)


    Kelvin Luck    Apr 1, 11:08    #
  109. This is wonderful and lightweight. My only complaint is the need to use the icon. I would really like it if I could have the option of having it popup when the user clicks (tabs?) into the date box.

    Thanks for all your work, you have made my life easier.


    Donovan    Apr 3, 21:44    #
  110. Hi Donovan,

    Glad you like the date picker :)

    There is already a (undocumented) option to have the calendar popup when an input is clicked on rather than the calendar – just pass inputClick:true in when you initialise your date picker. e.g.

    $(’#input-id’).datePicker({inputClick:true});

    Hope that helps,

    Kelvin :)

    By the way, I’m just about to go on holiday for a week – when I get back I will be finishing up the rewrite of datePicker.


    Kelvin Luck    Apr 3, 23:24    #
  111. Hi Kelvin!
    Yes, you’re right. Security alert is caused by iframe.
    Could you please email me if you have ideas about solving this problem?

    Best regards,
    Oleg


    — Oleg Ovchinnikov    Apr 4, 11:11    #
  112. For those of you needing year selection…go here:
    http://codetale.com/2007/02/23/javascript-calendar-widget

    I would rather use a jquery plugin but this will do the job for now.


    — Chris    Apr 4, 14:24    #
  113. Thanks for this, I love jquery, this is another great plugin.
    I had to comment out line 258 to get r1566 to run.


    — Seth    Apr 4, 15:23    #
  114. Hi again!

    Kelvin, let me propose a solution of “IFrame vs. SSL” issue to you.
    “The warning message occurs because Microsoft Internet Explorer is unable to determine if the SRC attribute of the IFRAME is secure or unsecure.” (http://support.microsoft.com/kb/261188)
    So I just added the SRC attribute to IFrame (Line 201 of datePicker_source.js):

    iframe src=”javascript:false;”

    Construction like

    iframe src=”//0”

    doesn’t solve the problem, because in such case the security alert occurs on clicking “Next” button on calendar.

    Thank you for your great work. Best regards,
    Oleg


    — Oleg Ovchinnikov    Apr 5, 11:01    #
  115. I am having a hard time getting select elements with the multiple=”multiple” attribute not to show through the calendar. Is this a known bug?


    Luke Visinoni    Apr 5, 22:00    #
  116. Hi Kelvin!
    One more bug in datePicker :)
    SELECT displays through the BORDER of calendar. For example, change the background color of the example page and you’ll see.


    — Oleg Ovchinnikov    Apr 11, 12:10    #
  117. Re: Security alert and iframe. Whenever I have seen that problem, the iframe’s src attribute has been defaulted to about:blank. To eliminate the security alert we default the src attribute to blank.html which is just an html page with an empty body. I’m not sure if that will help in this case but it has worked for us in the past.

    Good Luck,
    Tony


    — Tony Raitano    Apr 11, 17:29    #
  118. Hi,

    @Chris – or if you can wait for a little while then hold out because year selection will be available in datePicker v2 which is currently being worked on…

    @Seth – thanks for the headsup. I’d left some debugging code in there. Although the problem wouldn’t have effected most people because if you are running firebug or window.console == undefined (e.g. as it normally would be) then there would be no problem – it must have been conflicting with some other logging solution you are using on your page?

    @Oleg – thanks for the further investigations. I’ve updated the plugin to set the src for the iframe to a blank.html page I’ve created as suggested by Tony – does that help?

    @Luke – this isn’t an issue that I’ve run into before. In fact, I can’t replicate it on IE6 – do you have the problem on this page?

    @Oleg (again!) – thanks for the headsup re. the border. I’ll see if there is anything I can do about this in v2 of the datePicker.

    Thanks for all the feedback guys,

    Kelvin :)


    Kelvin Luck    Apr 12, 08:53    #
  119. Hi Kelvin!

    1) r1672 – Yes, I tried the construction like
    iframe src=”blank.html”.
    That really works but we need an additional dummy page :(. So I use the construction src=”javascript:false;”.
    Please, notice that I’ve tested it under IE6 and Opera 9.02 only.

    2) Do you already have a working solution of the border problem? Can you public the approximate date of v2 release?


    — Oleg Ovchinnikov    Apr 16, 10:26    #
  120. Hi Oleg,

    1) Do you still get the security error on clicking the “Next” button with the iframe src=”blank.html”?

    2) No solution for the border problem I’m afraid. Are the borders essential to your design? You could just remove the borders…

    As for a release date for v2, I’d hope to have a beta version publically available in the next few days.

    Thanks,

    Kelvin :)


    Kelvin Luck    Apr 16, 11:34    #
  121. Would be great to have the week number optionally displayed on left of each weeks.


    — sylvain261    Apr 16, 17:00    #
  122. Kelvin,
    Yes that is what I thought about your debugging code. The problem happened in IE6 and Firefox (w/ Firebug). I am working within the BEA WebLogic console, so BEA may have something else that is going on causing the conflict? I am not using any logging directly, but that is a problem with this portal development, I never know what is affecting my portion of the page, my code or all the other BEA code I cannot control. I am also having trouble with inputClick:true in IE6 and a readonly (yes I am aware that there are other potential usability issues), input but again the problem may be BEA and if so I do not think the benefit of a solution would justify the work.
    Typing of work, thanks for all you have and continue to put into this.
    -Seth


    — Seth    Apr 16, 21:29    #
  123. Hi!

    1) No, I don’t. It’s OK.
    2) It’s a pity :( The borders are really essential for my calendar because of the page style…


    — Oleg Ovchinnikov    Apr 17, 07:46    #
  124. @Sylvain –
    Hmmm – this is a new request but I can see how it might be useful. I’ll see if I can allow for it in v2 which I’m currently developing.

    @Seth –
    Very strange. If a console.log call was stopping it from running even in Firefox with firebug the the BEA thing must be doing something very weird! I don’t envy you debugging with weird things like that going on! Good luck :)

    @Oleg –

    1) Cool :)
    2) Hopefully v2 of the plugin will avoid this problem…

    Thanks for the feedback guys,

    Kelvin :)


    Kelvin Luck    Apr 17, 08:49    #
  125. Thanks for the plugin. One recomendation:
    When I open Calender it is open from left and top position 0 ralative to the picture. In some forms this cause a problem. Good choice will be if we can control this with parameters. Sorry for my poor engish.
    Regards
    Tony


    — Tony    Apr 20, 09:45    #
  126. Hi Tony,

    v2 of the plugin is very nearly ready and allows you to control exactly where the calendar appears (whilst still providing sensible defaults).

    Look out for a beta in the next day or so…

    Cheers,

    Kelvin :)


    Kelvin Luck    Apr 20, 09:55    #
  127. Hi kelvin!
    This is really very cool plugin, I hope v2 will be even better.
    In my recent project I wanted to disable the calendar temporarily but could not find an easy way to do it. It would be good if you would add “disabled” property in v2.


    — misha    Apr 24, 16:05    #
  128. Hi,

    You can judge for yourself how good v2 is – I announced the beta on the jQuery list this morning…

    Re. the disabled property, that’s a good idea. If the date picker is associated with an input and that input is disabled then the date picker should also become disabled. I’ll look into implementing that,

    Thanks,

    Kelvin :)


    Kelvin Luck    Apr 24, 16:30    #
  129. Can we have date block feature. Users shouldn’t be able to pick a date before today’s date.


    — MySchizoBuddy    May 3, 05:57    #
  130. Hi MySchizoBuddy,

    That is the default behaviour of both the original date picker and the v2 beta – if no startDate is passed then it defaults to today, otherwise you can set the startDate to whatever you like…

    Cheers,

    Kelvin :)


    Kelvin Luck    May 5, 23:00    #
  131. Hi,
    Great plug-in, congratulations. Sorry if I sound like a newbie, but I tried to set a default value (not the start date) and I couldn’t find how. I just want to have an input field reading the date from a database and to have that value as default. I hope you get what I mean ;-)


    — Jose    May 8, 16:39    #
  132. Hi Jose,

    Which version of the plugin are you using? In fact, it shouldn’t matter…

    In either version you can simply put a value into the input field and this will become the selected date in the date picker. So on page load use your database to write the date into the “value” attribute of the input field…

    Hope that helps,

    Kelvin :)


    Kelvin Luck    May 8, 22:39    #
  133. Hi Kelvin,

    First of all, nice work! and i dig the photos on your website, gave me some ideas on my next travel adventure.

    I am playing around with your Start and End Date datePicker demo (http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html) and was wondering.. is it really that neccessary to use so many .js files in order for this to work.

    1. jquery-1.1.2.js
    2. date.js
    3. dimensions.js
    4. jquery.datePicker.js

    and finally..
    5. Page Embedded javascript

    All adds up to a fairly hefty call to the server. Forgive me in advance if this is a dumb question but i am fairly new to javascript and over cautious with page download times.

    respect!
    Declan


    — Declan    May 16, 11:45    #
  134. Hi Declan,

    Thanks for your thoughts – glad you like the plugin :)

    If I was deploying the date picker on a production site I would combine date.js, dimensions.js and jquery.datePicker.js (and any other jQuery plugins I was using) into one file and compress it – if possible with gzip on the server or using packer

    You can even do this dynamically which means you can keep the files separate for easy development but serve them merged and compressed for optimal end user experience.

    When v2 comes out of beta I’ll try to put some recommendations for this approach onto the project page.

    Cheers,

    Kelvin :)


    Kelvin Luck    May 16, 21:37    #
  135. Hello Kelvin,

    great plug-in!

    I was wondering if you could add a link at the base of the calendar between the previous/next links that defaults to today’s date? Clicking on it would set the date and jump you back to today, i.e. reset the calendar (in case you are tired of paging through the months)

    Another way of combining all of the javascript & CSS files dynamically (using various scenarios) can be found here: http://code.google.com/p/minify/

    Keep up the good work!

    Cheers.


    — Christopher Vrooman    May 17, 03:26    #
  136. Hi, I like your v2 plugin.
    One thing… I don’t think that removing (_clearCalendar) calendar on each “close” and “month/year change” is a good idea. It is causing plugin reacts slowly. If you would reuse already generated html and just set classes for elements it should be much faster. Give it a try.

    Structure of the html generated never changes. Only values and styles.
    Example of reusing: ryanair.com – the object is reused also between both instances of calendar – the coding isn’t that nice but…

    Another thing i’ve noticed is “bold” isn’t working inside jCalendar class. This applies to your examples as well. I am not sure about cause, I didn’t do any deep examination of this.

    One nice feature could be to have “status” if you mouseover the datePicker. See example on ryanair.com.


    — Martin    Jun 22, 15:37    #
  137. Hi,

    @Chris – The today button is on the TODO list. And thanks for the info on minify, I’ll look into that properly when I get a chance but it looks good!

    @Martin – I have wondered if it would be any quicker to loop over the generated html and change it’s contents, classes and event handlers rather than recreating it each time but I haven’t had a chance to do any tests on it… By the way, the ryanair calendar doesn’t seem to cache the generated HTML at all. It just seems to generate it quicker.

    I just did some profiling (in firebug) of my calendar vs. the Ryanair one and mine seems to take approximately twice as long (187ms vs 93ms for flicking three months forward) for most operations. It seems like most of this is in the overhead of using a library rather than native DOM scripting though. And in the time taken to evaluate the hooks that I have added in for the extensibility and reusablitily of the calendar.

    There is definitely room for improvement though. Date.addDays seems to be responsible for 25% of the time used to create a calendar – there should definitely be a quicker way to do this!

    Re. font-weight=bold not working, I’m guessing this is because the font is set to 10px which doesn’t render a bold version.

    Re. the status message, yes – this is something I could easily add (although I’ll want to make sure it doesn’t impact performance when it isn’t used).

    Thanks for the feedback. v2 of the date picker is still in a stable beta, I’d like to tweak the performance of it before the complete release,

    Cheers,

    Kelvin :)


    Kelvin Luck    Jun 23, 12:55    #
  138. Hey, thanks for your response… I must admit I was wrong… honestly I wrote that calendar :)) a while ago and one of my ideas was to do caching, however things go really fast in ryanair so i didn’t get chance :) but somehow it got stuck in my mind… ok no more excuses…
    Your reactions make perfect sense – RESPECT


    — Martin    Jun 25, 23:25    #
  139. Thanks Martin :)

    The ryanair calendar is great, I guess I have to sacrifice some of the speed for flexibility but you’ve definitely prodded me into profiling and trying to streamline the plugin when I next get some free time…

    Thanks for the feedback,

    Kelvin :)


    Kelvin Luck    Jun 26, 19:36    #
  140. How to disable specific month, ex: when I’m browsing July, and Ausgust need disable, I click next month and I will be redirected to September. Any ideas?


    Linh    Jul 4, 04:20    #
  141. Hi Linh,
    The only way you can currently do it is by disabling all the days in August in the same way as I disable the weekend in this example.

    It won’t make the date picker jump over August when you click next month but it will prevent you from being able to select any days in August…

    Hope that helps,

    Kelvin :)


    Kelvin Luck    Jul 7, 13:42    #
  142. Thank Kelvin, your response very helpful.


    Linh    Jul 9, 02:08    #
  143. My favourite calendar so far. I would love to see the following:
    3 parameters on the create:
    1) Allowable date in the past (so 2 months prior to today)
    2) the Start Date as it is now (almost certainly always be defaulted to todays date)
    3) max date


    james    Jul 19, 10:20    #
  144. Thanks Kelvin, I really like this calendar, works well for me.

    I was wondering one thing I couldn’t find, is there a way to click on the next month or next year selection and have it scroll through without having to click multiple times?


    — Mike    Jul 19, 16:01    #
  145. Hi,

    Glad you like the plugin :)

    @James – I think you can do everything you are asking for… Did you see the startDate and endDate parameters?

    @Mike – I’m not sure I understand you… You mean click next month or next year and the calendar then starts cycling through all of the months?

    Cheers,

    Kelvin :)


    Kelvin Luck    Jul 19, 18:24    #
  146. yes Kelvin thats what i was wondering, im pretty new to web programming so not sure if thats even possible. Thanks


    — Mike    Jul 19, 20:55    #
  147. Hi love your work, how do I default todays date into the holder box?


    — wortho    Jul 27, 04:40    #
  148. Hi wortho,

    I’ve added two new examples which show exactly how to do this,

    Hope it helps,

    Kelvin :)


    Kelvin Luck    Jul 29, 21:02    #
  149. Firstly, Thank you!

    I’m having trouble mixing the Start and End datePicker and having the selected date (the value) show up as selected. It always shows todays date selected by default. As in the simple datePicker today selected example.

    Thanks again!


    theD    Aug 1, 22:16    #
  150. This seems to work. I changed the following:
    $(’.date-pick’).datePicker({
    createButton:false,
    displayClose:true,
    clickInput:true,
    })

    To this:

    $(’#start-date’).datePicker({
    createButton:false,
    displayClose:true,
    clickInput:true,
    }).val(new Date($(’#start-date’).val()).asString()).trigger(‘change’);

    $(’#end-date’).datePicker({
    createButton:false,
    displayClose:true,
    clickInput:true,
    }).val(new Date($(’#end-date’).val()).asString()).trigger(‘change’);

    and you’ll have to add an if statement to load the portion I changed if your date in input date values are null.

    In my situation the page loads with no dates selected and doesn’t display Na/Na/Na. Then you pick some dates and submit the page. Now those values you submitted will be selected if you click on them again.

    Maybe there is a prettier way?


    theD    Aug 1, 22:38    #
  151. Hi theD,

    I’m not quite clear what you are trying to do… You want linked start and end date pickers but you also want to be able to pass in a selected date on page load? If you can describe exactly what you are trying to achieve then I’m sure I can supply you with a cleaner way to achieve it,

    Cheers,

    Kelvin :)


    Kelvin Luck    Aug 7, 09:06    #
  152. Using Opera 9.2.3, the date picker would not start if it is placed in a blockUI div box. The only thing I am able to trace so far is the “this.ele” in the “display” function is null or an empty object.


    — Chong    Aug 16, 04:18    #
  153. Hi Chong,

    Can you post an example page showing this problem? Either here or on the jQuery mailing list.

    That should help me to debug the problem… Also, does the problem only occur in Opera? Does the contents of the BlockUI div exist when you initialise the datePicker or do you create it after?

    Cheers,

    Kelvin :)


    Kelvin Luck    Aug 16, 08:33    #
  154. Thank you so much Oleg Ovchinnikov without knowing you save me with your message dating of Apr 5, 12:01.


    — Amara    Nov 14, 13:01    #
  155. Great calendar, simple, no additives…

    I only needed to change base css, because the ‘fixed’ width of the table (div.dp-popup) does not allow me to fit in my design, and I was a bit loss until I discover it.

    Great work!.. Thanks for Sharing.


    — miguelito    Nov 24, 19:11    #
  156. Kelvin,

    I have an inline datepicker, and when I dpSetSelect an element, I’d like to have its status change immediately on the calendar. Is this possible? It seems to require a rerender, which I’m having difficulty executing properly.

    Thanks
    Christian


    — Christian    Nov 28, 17:15    #
  157. Hi,

    @miguelito – Thanks :)

    @Christian – This is an issue a couple of people have recently noticed. There is a ticket on it – I will try and fix the problem ASAP and update that ticket,

    Thanks,

    Kelvin :)


    Kelvin Luck    Dec 10, 19:57    #
  158. Hello Kelvin,

    I am developing a calendar application. Is there a way to add events and display event on mouse over?


    — chaitu    Mar 11, 15:31    #
  159. Hi Chaitu,

    Sorry for the very slow reply!

    You can use a renderCallback to control how each cell is rendered and to optionally add custom event handlers.

    This example should help – you could bind a mouseover function in the same was as I bind the click function.

    Hope that helps,

    Kelvin :)


    Kelvin Luck    Mar 20, 11:51    #
  160. Hi! Great Job! Calendar is exellent, but I have one question. Is there any chance to connect “multiple select” with php or better Mysql base. Thanks for answer Cheers :)


    — Mark    Mar 24, 00:25    #
  161. When setting the date format to this:

    Date.format = ‘mm/dd/yy’;

    it fills the field with something like this:

    04/04/108

    Is there a way to get it to use the two-digit date?

    Thanks,
    JRB


    — JRB    Apr 4, 16:55    #
  162. Hi JRB,

    Are you definitely using the latest version of all files (including date.js file)? I ran into this issue a while back and thought it was solved… I had to add a Date.fullYearStart variable to the date.js file…

    Hope that helps,

    Kelvin :)


    Kelvin Luck    Apr 4, 21:31    #
  163. That was it—the date.js file was old.

    Thanks!


    — JRB    Apr 8, 15:42    #
  164. Hello Kelvin
    one more thank you for such a great plugin.
    I’ve been trying to add a onClick event when you:
    1. click “prev” / “next”
    2. Change the month/year from the drop_downs

    It will be great if there is a way to add such event as an option (like the one when you select a specific date).

    Thanks for any tip you can give.


    Edwin    Apr 27, 23:14    #
  165. Hi Edwin,

    Did you see the dpMonthChanged event in the documentation?

    That fires when you change month with the next/ previous buttons. For the drop downs do you mean where you use linked dropdowns? In that case you can listen to the native change event on the dropdowns themselves…

    Hope that helps,

    Kelvin :)


    Kelvin Luck    Apr 27, 23:52    #
  166. The “change” event is triggered too early on a datepicker’s referenced textfield (when the event handlers are fired, the previous value of the field is read, instead of the new one).


    Ascanio    May 7, 14:31    #
  167. Hi

    I can’t get the date picker (date text field and button) on the same line with other elements (e.g. text or text fields). The datepicker always enforces a line break. How can I have the date picker text field on the same line with other elements without having to change code from the datepicker lib? Thanks a lot in advance for advice!

    Dom


    — Dom    May 15, 18:00    #
  168. Hello,

    Is there a way to set the end date to today’s date?

    Thanks,
    Johnie Karr


    — Johnie Karr    May 20, 21:31    #
  169. Hi Kelvin,
    Great work on the datepicker. As an FYI to you and to all: if using with a corners (curvycorners) plugin, be reminded to check the order in which the plugins are called. Should be corners before datepicker.
    $(”.form_container”).corner();
    $(”.date-pick”).datePicker();
    -Michael


    Michael E. Carluen    May 28, 23:59    #
  170. hi
    great picker, but is there a known problem with firefox, as i have set the past date and it works fine with Safari but in Firefox the past date is not set
    Cheers
    Kevin


    — kevin    Jun 4, 09:49    #
  171. Hey guys,

    Sorry for the slow reply!

    @Ascanio – thanks for the bug report – I’ll look into it when I get a chance.

    @Dom – you need to use some css. Try wrapping the date picker input field in a div with a float on it…

    @Johnie – yes! Try something like: .datePicker({endDate:new Date().asString()});

    @Michael – thanks for the info :)

    @Kevin – I haven’t seen this problem. Do you have a URL I can look at to help you debug?

    Cheers,

    Kelvin :)


    Kelvin Luck    Jun 4, 09:55    #
  172. i’m testing locally at the moment, it works fine in an html document but i’m using php and it looks like it does not like passing the start date to the other scripts
    can it be coded into the relevant place?
    kev


    — kevin    Jun 4, 12:05    #
  173. Hi Kevin,

    It sounds like the problem isn’t related just to the date picker. Does your input have a name attribute as well as an id attribute? I can’t really help any more without seeing the page in question…

    Cheers,

    Kelvin :)


    Kelvin Luck    Jun 4, 13:18    #
  174. hi, great script.
    Im having a problem when I set up start date it works fine, but if I set Date.format = ‘yyyy-mm-dd’ too, the start date stop working.
    It dont let me change select past dates and reformat the date.
    Im using this code:
    Date.format = ‘yyyy-mm-dd’;
    $(function()
    {
    $(’.date-pick’).datePicker({startDate:’01/01/1996’}).val(new Date().asString()).trigger(‘change’);
    });
    Thaks
    Juanto


    — Juanto    Jul 1, 15:33    #
  175. Hi Juanto,

    If you set the date format then you need to set the startDate in that format… e.g.

    Date.format = ‘yyyy-mm-dd’;
    $(function()
    {
    $(’.date-pick’).datePicker({startDate:’1996-01-01’}).val(new Date().asString()).trigger(‘change’);
    });


    Kelvin Luck    Jul 2, 23:10    #
  176. Hi Kelvin,

    Very nice script. However, is it possible for it to display the names of the days and/or months when its displayed in the input field?

    I’ve looked through the JS, but my JS skills are somewhat basic and i cant figure it out..
    thanks
    :)


    Nick    Jul 11, 17:51    #
  177. Hi Nick,

    No – that isn’t currently possible as it stands… You should be able to use a three letter version of the month names by setting the date format to e.g. dd mmm yyyy:

    Date.format = ‘dd mmm yyyy’;

    That is as close as you can get to your request with the plugin as-is…

    You could also extend the plugin by using custom listeners as in this example and format the value as you liked in your listener and pass it back to the relevant input.

    However, displaying the names of days and months in the input box will probably make the job of the serverside script that you post to harder so I’m not sure I’d suggest it…

    Hope that helps,

    Kelvin :)


    Kelvin Luck    Jul 20, 01:26    #
  178. Hi Kelvin,
    Thanks for this plugin; it’s very useful. I’m wondering if there’s a simple way to allow picking dates prior to 1970. Any thoughts?

    Thanks again.


    — ji    Jul 21, 19:19    #
  179. Hi Kevin,

    Thanks for your brilliant code.

    I’m having an issue with thickbox on safari. It’s working without thickbox though. But not with the thickbox.

    Any chance to have a look?

    Thanks


    — oktay    Jul 24, 20:43    #
  180. I’ll use your code in my one of app.I’ll give you a credit if your code wins competition


    speedovation    Aug 13, 19:39    #
  181. I’m working on project which can not have more than 5 dates selected. It would be great to have the ability to define the max amount of selectMutiple. Is this possible?


    — jose    Aug 26, 16:56    #
  182. If I have a range of dates, how can I default the inital values to either “today” (OK), or the POSTED value (if there is one) for each of the two dates in my form? (Using PHP, BTW)


    — Rob    Sep 8, 09:08    #
  183. I am using datePicker and on the basic of selected start and end date i get data from databse.The problem i am facing is,if i dont click on any of two date field and click the subsit button it closes my browser by giving this widnow error in popup “Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience.”.If i just click on any of the two date fields then it words well.
    Only IE6 gives this error.Other browsers r working perfectly well.
    code is

    ”/>

    and javascript code:

    Date.firstDayOfWeek = 7;
    Date.format = ‘dd/mm/yyyy’;
    $(function()
    {
    $(’.date-pick-start’).datePicker({clickInput:true,startDate:’01/01/2007’,endDate:’’});
    $(’.date-pick-start’).dpSetSelected(‘’);
    $(’.date-pick-end’).datePicker({clickInput:true,startDate:’01/01/2007’,endDate:’’});
    $(’.date-pick-end’).dpSetSelected(‘’);

    });

    I spend almost 2 hrs bt not gettin any clue.Plz help.Thanks.


    — Faraz    Sep 11, 08:04    #
  184. I’m trying to solve what seems like a slight bug with Safari. I am trying to have the datepicker window show up when an image field is clicked. It works in IE7 and FF3, but not Safari. Am I doing something wrong or just trying to get it to do something it won’t do?


    Tom    Sep 17, 21:46    #
  185. Hi,
    I’m having an issue with the display of the header (ie. October, 2008) at the top of the calender. I’m not at all sure why this is happening. I’ve got it setup so that it appears in the corner of the form when an input is selected. Any help would be appreciated, thanks.


    — Josh    Oct 10, 06:41    #
  186. Hi can any body tell me is there any JQuery Datepicker forum.


    — thesmartmind    Oct 17, 05:29    #