[jQuery] Re: Datepicker and IE7
Solution is found. In my environment we had another framework, DWR, that uses some javascript as well. DWR does use the character $ for some of it's functions. The solution was to use the folowing code when using JQuery: jQuery.noConflict(); jQuery(document).ready(function($){ $('#campaignDate').datepicker($.datepicker.regional['pt-BR']); }); It was painful to discover this, specially since the first code runs in FireFox and Chrome smoothly. On Sep 22, 3:05 pm, Vitor Santos vitor.bvsan...@gmail.com wrote: I searched all IE7 FAQs and tips but I could not find the solution. Basically the Datepicker doesn't work at all in IE7. It does not appear and most disturbing, IE7 doesn't show any Javascript error. Works just fine in FF3. My code is: script type=text/javascript $(function() { $('#campaignDate').datepicker($.datepicker.regional['pt-BR']);}); /script input type=text name=form.campaignDate size=7 value=__/__/ id=campaignDate class=textoTextfield/ I tried removing the last semicolon but nothing changed.
[jQuery] Re: Datepicker and Jquery updating the value of pulldown menu
updating the values of the pulldown menu ounce the user have choosen a date from the Jquery datepicker Something like this should work in the datepicker include onSelect: updateLinked then (change as needed for your pull down ids) // Update three select controls to match a date picker selection // But need to get rid of leading zero on day and month first function updateLinked(t_date) { var s_mo = t_date.substring(0, 1); if (s_mo == '0') { $('#month').val(t_date.substring(1, 2)); } else { $('#month').val(t_date.substring(0, 2)); } var s_day = t_date.substring(3,4); if (s_day == '0') { $('#day').val(t_date.substring(4, 5)); } else { $('#day').val(t_date.substring(3, 5)); } $('#year').val(t_date.substring(6, 10)); } On Sep 18, 3:21 am, pennfoli0 pennfo...@gmail.com wrote: Hi, I need help adding the jquery date picker to my existing code, but not reconstructing the whole HTML file. my code, !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titlecalenar/title script src=http://ajax.googleapis.com/ajax/libs/jquery/ 1.3.2/ jquery.min.js type=text/javascript charset=utf-8/script script src=http://ajax.googleapis.com/ajax/libs/jqueryui/ 1.7.2/jquery-ui.min.js type=text/javascript charset=utf-8/ script script type=text/javascript $(function(){ // #datepickers $(#datepicker).datepicker({showOn: 'button', buttonImage: 'images/calendar.gif', buttonImageOnly: true}); }); /script /head body pDepart:/p table cellpadding=2 cellspacing=0 border=0 tr tdselect name=departureMonth onchange=javascript:dmddChange (document.hotForm.departureMonth,document.hotForm.departureDay); option value=0January/option option value=1February/option option value=2March/option option value=3April/option option value=4May/option option value=5June/option option value=6July/option option value=7August/option option value=8September/option option value=9October/option option value=10November/option option value=11December/option /select/td tdselect name=departureDay onchange=dmddChange (document.hotForm.departureMonth,document.hotForm.departureDay) option value=11/option option value=22/option option value=33/option option value=44/option option value=55/option option value=66/option option value=77/option option value=88/option option value=99/option option value=1010/option option value=/option option value=1212/option option value=1313/option option value=1414/option option value=1515/option option value=1616/option option value=1717/option option value=1818/option option value=1919/option option value=2020/option option value=2121/option option value=/option option value=2323/option option value=2424/option option value=2525/option option value=2626/option option value=27 selected=selected27/option option value=2828/option option value=2929/option option value=3030/option option value=3131/option /select/td tda href=javascript:openCalendar('hotForm', 'departure');img src=http://affiliate.travelnow.com/ searchboximages/blueFormCalendar.gif border=0//a/td /tr /table pGoing to:/p table cellpadding=2 cellspacing=0 border=0 tr tdselect name=departureMonth onchange=javascript:dmddChange (document.hotForm.departureMonth,document.hotForm.departureDay); option value=0January/option option value=1February/option option value=2March/option option value=3April/option option value=4May/option option value=5June/option option value=6July/option option value=7August/option option value=8September/option option value=9October/option option value=10November/option option value=11December/option /select/td tdselect name=departureDay onchange=dmddChange (document.hotForm.departureMonth,document.hotForm.departureDay) option value=11/option option value=22/option option value=33/option option value=44/option option
[jQuery] Re: Datepicker issue
Yeah, I was wanting to avoid the need to write a function..or freezing the textbox.to me it seems wierd or inconsistant that the datepicker won't allow you to pick a date beyond the maxDate, but you can enter it manually and nothing happens (it should revert back to the maxDate).. anyways all good, I guess I'll have to add that functionality myself.. Thanks though On Aug 26, 11:47 am, rupak mandal rupakn...@gmail.com wrote: hi, you can try this $(#datepicker).change(function() { var date1=$(#datepicker).val(); var myday = new Date(date1); var today= new Date(); var one_day=1000*60*60*24; chan_date=Math.ceil((myday.getTime()-today.getTime())/(one_day)); var month = myday.getMonth()+1; if(month10) month=0+month; var dat=myday.getDate(); if(dat10) dat=0+dat; if(chan_date0) $(#datepicker).attr(value,month+/+dat+/+myday.getFullYear()) }); }); but the better option is that restrict the user to enter date manually. Made the datepicker text box readonly. Thanks Rupak On Wed, Aug 26, 2009 at 3:25 AM, sak saks...@gmail.com wrote: Hi there I have a problem with the date picker and was wondering if something had already been developed to sort it out, or whether I would need to do one myself. With a datepicker in the webapp we are developing, we want to allow users to view data based on past dates (ie anything from an old date up to present date). So with this in mind I have set the max date on the datepicker like this {maxDate: +0} so users can't pick dates beyond today. However if the user manually enters the dates (say beyond the maxDate) then nothing happens. The date input holds the date entered even if it is beyond the maxDate set. What I want it to do, is if the users manually types in a date (if that date is beyond the maxDate set) then it should revert back to the maxDate. can the datepicker do this? Any help will be awesome Thanks Sak
[jQuery] Re: Datepicker issue
Hi, Yo can always set the textfield readonly to avoid this. - Original Message - From: MorningZ morni...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, August 26, 2009 7:29 AM Subject: [jQuery] Re: Datepicker issue to me it seems wierd or inconsistant that the datepicker won't allow you to pick a date beyond the maxDate, but you can enter it manually and nothing happens Hence it's date picker and not date enter-er, it does it's job, let's the use *pick* a date from a calendar On Aug 26, 7:55 am, sak saks...@gmail.com wrote: Yeah, I was wanting to avoid the need to write a function..or freezing the textbox.to me it seems wierd or inconsistant that the datepicker won't allow you to pick a date beyond the maxDate, but you can enter it manually and nothing happens (it should revert back to the maxDate).. anyways all good, I guess I'll have to add that functionality myself.. Thanks though On Aug 26, 11:47 am, rupak mandal rupakn...@gmail.com wrote: hi, you can try this $(#datepicker).change(function() { var date1=$(#datepicker).val(); var myday = new Date(date1); var today= new Date(); var one_day=1000*60*60*24; chan_date=Math.ceil((myday.getTime()-today.getTime())/(one_day)); var month = myday.getMonth()+1; if(month10) month=0+month; var dat=myday.getDate(); if(dat10) dat=0+dat; if(chan_date0) $(#datepicker).attr(value,month+/+dat+/+myday.getFullYear()) }); }); but the better option is that restrict the user to enter date manually. Made the datepicker text box readonly. Thanks Rupak On Wed, Aug 26, 2009 at 3:25 AM, sak saks...@gmail.com wrote: Hi there I have a problem with the date picker and was wondering if something had already been developed to sort it out, or whether I would need to do one myself. With a datepicker in the webapp we are developing, we want to allow users to view data based on past dates (ie anything from an old date up to present date). So with this in mind I have set the max date on the datepicker like this {maxDate: +0} so users can't pick dates beyond today. However if the user manually enters the dates (say beyond the maxDate) then nothing happens. The date input holds the date entered even if it is beyond the maxDate set. What I want it to do, is if the users manually types in a date (if that date is beyond the maxDate set) then it should revert back to the maxDate. can the datepicker do this? Any help will be awesome Thanks Sak
[jQuery] Re: datepicker
Can you provide sample code or a link? Thanks On 22 jul, 00:51, acatejr acat...@gmail.com wrote: I am using the jQuery datepicker. When the user selects an item in a drop down list box the selectable dates in the calender in the datepicker get updated with all selectable dates associated with the selected drop down list item. The dates seem to update fine except for the very last one. If I click the back arrow for the last month then the forward arrow to go to the current month the calendar then has all of the new selectable dates. Any idea why the current months selectable dates aren't updated with the calender as rendered? Thanks.
[jQuery] Re: $(#datepicker).datepicker is not a function
Make jure your datepicke script is loaded first in your browser.. You can use firebug to see if the script is laoded correctly - Original Message - From: Charlie To: jquery-en@googlegroups.com Sent: Thursday, July 02, 2009 12:00 PM Subject: [jQuery] Re: $(#datepicker).datepicker is not a function if a jQuery function throws is not a function error it's because that function is not available when you call it. Available means browser hasn't loaded it, so either you don't have script files in correct order or a path to file problem jQueryUI site explains the order, path easy to check in browser. Priya wrote: hi i am getting this error when i was trying to use the jquery datepicker widget.Can you please help me to solve this issue?
[jQuery] Re: $(#datepicker).datepicker is not a function
if a jQuery function throws "is not a function" error it's because that function is not available when you call it. Available means browser hasn't loaded it, so either you don't have script files in correct order or a path to file problem jQueryUI site explains the order, path easy to check in browser. Priya wrote: hi i am getting this error when i was trying to use the jquery datepicker widget.Can you please help me to solve this issue?
[jQuery] Re: datepicker UI select multiple date
Hi, Datepicker does not currently support multiple selected days. If you're looking to load event dates into datepicker you could take a look at beforeShowDay event. Here's an example: http://jsbin.com/idubu On Wed, Jun 24, 2009 at 3:03 PM, bumbar bum...@abv.bg wrote: I use datepicker UI. Is it possible to be selected multiple events, dates taken from a mysql with PHP? can you give me links to similar developments -- Ca-Phun Ung + http://yelotofu.com + hongkong, zce, jquery, jqueryui, php, css, html
[jQuery] Re: Datepicker covering textbox
Here are some screenshots: http://hallowdmachine.com/images/datepicker_closed.jpg http://hallowdmachine.com/images/datepicker_open.jpg On Jun 18, 10:31 am, michael michael.howl...@gmail.com wrote: (Cross-posted from the jQuery UI group, as my post is not showing up over there. Hope it shows here.) Hello all, When viewing the page in 1024x768 resolution, the jquery UI datepicker is covering the text input to which it is attached. This input is near the bottom of the page when viewing at that resolution, which seems to be causing the issue. I can't move the element so is there a way to move the calendar? I'd like it to open with the bottom edge of the datepicker at the top edge of the text input. Any help is greatly appreciated. Thanks, michael
[jQuery] Re: datepicker highlight individual days
I'm having the same problem. It makes sense to hilite individual days because those days might be important. On Apr 7, 7:04 am, MorningZ morni...@gmail.com wrote: That doesn't make any sense the control by default is looking for the user to choose one individual day On Apr 7, 8:15 am, Danny dannyt...@gmail.com wrote: Hi, Is there a way to highlight or enable for selection individual days ( not a range of days ) in adatepicker? Thanks in advance, Danny
[jQuery] Re: datepicker
I did it By using the Date class function getEndDate() { var s=document.getElementById(arrivalDate).value; alert(s); if(s==) { alert(Please select start date first); } else{ var d=new Date(s); $(#depart).datepicker({minDate: d, maxDate: '+1M +10D'}); // } } On Apr 15, 1:18 pm, HISSAM hissam.sher...@gmail.com wrote: guys I have 2 datepickers 1)arrivalDate 2)DepartDate The mindate of Depart must be the mindate of ArrivalDate I'm able to get the arrival date but I'm unable to set that in depart mindate attribute //arrivaldate.value=14/04/2009//which is erroneous when set to depart date The snippet of code is here below function getStartDate() { $(#arrivalDate).datepicker({minDate: 0, maxDate: '+1M +10D'}); } function getEndDate() { var s=document.getElementById(arrivalDate).value; alert(s); if(s==) { alert(Please select start date first); } else{ $(#depart).datepicker({minDate: s, maxDate: '+1M +10D'}); // s=14/04/2009//which is erroneous } }
[jQuery] Re: datepicker highlight individual days
That doesn't make any sense the control by default is looking for the user to choose one individual day On Apr 7, 8:15 am, Danny dannyt...@gmail.com wrote: Hi, Is there a way to highlight or enable for selection individual days ( not a range of days ) in a datepicker? Thanks in advance, Danny
[jQuery] Re: Datepicker
simply apply some CSS to it span.datepicker_wrap img { cursor: pointer; } On Feb 26, 1:24 am, Leroy leroy@gmail.com wrote: Hi all, I am using the jquery datepicker with the 'buttonImage'. What I am trying to do is just when the mouse is over the image, to change it to a hand rather than a pointer. Any ideas anyone? Thanks in advanced!
[jQuery] Re: Datepicker
Thanks for the reply... however i am just wondering where do i put the CSS? My code looks something like this: $(document).ready(function() { $('#dp_date).datepicker({speed: 'fast', showOn: 'both', showAnim: 'show', closeAtTop: false, nextText: '', prevText: '', changeMonth: true, changeYear: true, buttonImageOnly: true, buttonImage: '/lib/images/calendar.gif', buttonText: 'Choose date', dateFormat: 'dd/mm/yy', yearRange: '-4:+4', onSelect: function(dateText) { do_goToDayWhiteboardDate (dateText) } }); }); Sorry, i'm not that familiar with this.. On Feb 26, 11:24 pm, MorningZ morni...@gmail.com wrote: simply apply some CSS to it span.datepicker_wrap img { cursor: pointer; } On Feb 26, 1:24 am, Leroy leroy@gmail.com wrote: Hi all, I am using the jquerydatepickerwith the 'buttonImage'. What I am trying to do is just when the mouse is over the image, to change it to a hand rather than a pointer. Any ideas anyone? Thanks in advanced!- Hide quoted text - - Show quoted text -
[jQuery] Re: Datepicker
in the page's CSS (nothing to do with the datpicker declaration).. easy as that On Feb 26, 5:22 pm, Leroy leroy@gmail.com wrote: Thanks for the reply... however i am just wondering where do i put the CSS? My code looks something like this: $(document).ready(function() { $('#dp_date).datepicker({speed: 'fast', showOn: 'both', showAnim: 'show', closeAtTop: false, nextText: '', prevText: '', changeMonth: true, changeYear: true, buttonImageOnly: true, buttonImage: '/lib/images/calendar.gif', buttonText: 'Choose date', dateFormat: 'dd/mm/yy', yearRange: '-4:+4', onSelect: function(dateText) { do_goToDayWhiteboardDate (dateText) } }); }); Sorry, i'm not that familiar with this.. On Feb 26, 11:24 pm, MorningZ morni...@gmail.com wrote: simply apply some CSS to it span.datepicker_wrap img { cursor: pointer; } On Feb 26, 1:24 am, Leroy leroy@gmail.com wrote: Hi all, I am using the jquerydatepickerwith the 'buttonImage'. What I am trying to do is just when the mouse is over the image, to change it to a hand rather than a pointer. Any ideas anyone? Thanks in advanced!- Hide quoted text - - Show quoted text -
[jQuery] Re: Datepicker
to note, that CSS was for an older version of the datepicker img.ui-datepicker-trigger { cursor: pointer; } works on the later versions (i have ui.1.6.rc2.datepicker and that CSS works) On Feb 26, 5:31 pm, MorningZ morni...@gmail.com wrote: in the page's CSS (nothing to do with the datpicker declaration).. easy as that On Feb 26, 5:22 pm, Leroy leroy@gmail.com wrote: Thanks for the reply... however i am just wondering where do i put the CSS? My code looks something like this: $(document).ready(function() { $('#dp_date).datepicker({speed: 'fast', showOn: 'both', showAnim: 'show', closeAtTop: false, nextText: '', prevText: '', changeMonth: true, changeYear: true, buttonImageOnly: true, buttonImage: '/lib/images/calendar.gif', buttonText: 'Choose date', dateFormat: 'dd/mm/yy', yearRange: '-4:+4', onSelect: function(dateText) { do_goToDayWhiteboardDate (dateText) } }); }); Sorry, i'm not that familiar with this.. On Feb 26, 11:24 pm, MorningZ morni...@gmail.com wrote: simply apply some CSS to it span.datepicker_wrap img { cursor: pointer; } On Feb 26, 1:24 am, Leroy leroy@gmail.com wrote: Hi all, I am using the jquerydatepickerwith the 'buttonImage'. What I am trying to do is just when the mouse is over the image, to change it to a hand rather than a pointer. Any ideas anyone? Thanks in advanced!- Hide quoted text - - Show quoted text -
[jQuery] Re: Datepicker
Thanks heaps for all your help! That works perfectly! On Feb 27, 9:34 am, MorningZ morni...@gmail.com wrote: to note, that CSS was for an older version of thedatepicker img.ui-datepicker-trigger { cursor: pointer; } works on the later versions (i have ui.1.6.rc2.datepickerand that CSS works) On Feb 26, 5:31 pm, MorningZ morni...@gmail.com wrote: in the page's CSS (nothing to do with the datpicker declaration).. easy as that On Feb 26, 5:22 pm, Leroy leroy@gmail.com wrote: Thanks for the reply... however i am just wondering where do i put the CSS? My code looks something like this: $(document).ready(function() { $('#dp_date).datepicker({speed: 'fast', showOn: 'both', showAnim: 'show', closeAtTop: false, nextText: '', prevText: '', changeMonth: true, changeYear: true, buttonImageOnly: true, buttonImage: '/lib/images/calendar.gif', buttonText: 'Choose date', dateFormat: 'dd/mm/yy', yearRange: '-4:+4', onSelect: function(dateText) { do_goToDayWhiteboardDate (dateText) } }); }); Sorry, i'm not that familiar with this.. On Feb 26, 11:24 pm, MorningZ morni...@gmail.com wrote: simply apply some CSS to it span.datepicker_wrap img { cursor: pointer; } On Feb 26, 1:24 am, Leroy leroy@gmail.com wrote: Hi all, I am using the jquerydatepickerwith the 'buttonImage'. What I am trying to do is just when the mouse is over the image, to change it to a hand rather than a pointer. Any ideas anyone? Thanks in advanced!- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: Datepicker Plugin Quesiton
On Sun, Feb 15, 2009 at 9:21 PM, Tze Yang Ng ngt...@gmail.com wrote: minDate: new Date() When i use the datepicker, i have the habit of digging through package/ui/ui.datepicker.js to find out the options supported. The Datepicker is documented quite well: Stable (1.5.3): http://docs.jquery.com/UI/API/1.5.3/Datepicker/datepicker Preview (1.6rc6): http://docs.jquery.com/UI/Datepicker#options - Richard
[jQuery] Re: Datepicker Plugin Quesiton
I guess it is just a habit on my part, acessing the online docs can be slow at times from my china office. == On Mon, Feb 16, 2009 at 5:15 PM, Richard D. Worth rdwo...@gmail.com wrote: On Sun, Feb 15, 2009 at 9:21 PM, Tze Yang Ng ngt...@gmail.com wrote: minDate: new Date() When i use the datepicker, i have the habit of digging through package/ui/ui.datepicker.js to find out the options supported. The Datepicker is documented quite well: Stable (1.5.3): http://docs.jquery.com/UI/API/1.5.3/Datepicker/datepicker Preview (1.6rc6): http://docs.jquery.com/UI/Datepicker#options - Richard -- http://ngty77.blogspot.com
[jQuery] Re: Datepicker Plugin Quesiton
dateFormat: 'y-mm-dd', 09-02-16 dateFormat: 'yy-mm-dd', 2009-02-16 On Sat, Feb 14, 2009 at 10:21 PM, Hellofrom hellof...@gmail.com wrote: Hello every one Can some one help me setting the datepicker plugin with the following options min date =today date format =-mm-dd thanks
[jQuery] Re: Datepicker Plugin Quesiton
minDate: new Date() When i use the datepicker, i have the habit of digging through package/ui/ui.datepicker.js to find out the options supported. == On Sat, Feb 14, 2009 at 10:21 PM, Hellofrom hellof...@gmail.com wrote: Hello every one Can some one help me setting the datepicker plugin with the following options min date =today date format =-mm-dd thanks -- http://ngty77.blogspot.com
[jQuery] Re: Datepicker UI Opening at Random / Unexpected Locations
Yeap, a test page would help to find the bug... One more question. Are you positioning your elements in CSS using relative/absolute ? Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Feb 7, 2009 at 8:38 AM, Ca-Phun Ung cap...@yelotofu.com wrote: Hi, Which version of UI are you using? We recently fixed a similar bug which was rolled into 1.6rc6. For details of the bug see this ticket: http://dev.jqueryui.com/ticket/3863 Finally, if you're using the latest rc it would be a great help if you could upload a minimal test page somewhere. Thanks! On Fri, Feb 6, 2009 at 11:31 PM, Dayson Pais percy.p...@gmail.com wrote: Hi, I have a Datepicker UI linked to a textbox using the following code: $(document).ready(function(){ txtDOB = $(input[name=txtDOB]); txtDOB.datepicker(); }); Screenshot of the Textbox: http://arch.kimag.es/share/85588260.jpg When I click on the textbox, the calendar opens at an unexpected location as seen in this picture Firefox appears over textbox: http://arch.kimag.es/share/34288230.jpg Chrome Working Fine: http://arch.kimag.es/share/75291561.jpg It works fine in Chrome. I really can't figure out why this is happening.. It works perfectly if the textbox is placed in the top regions of the page. The Actual Problem in a practical situation is here: http://arch.kimag.es/share/66324568.jpg I need this resolved as I really don't want to use a calendar component from some other module if jquery has it. Thanks -- Ca-Phun Ung + http://yelotofu.com + hongkong, zce, jquery, php, css, html
[jQuery] Re: Datepicker UI Opening at Random / Unexpected Locations
Hi, Which version of UI are you using? We recently fixed a similar bug which was rolled into 1.6rc6. For details of the bug see this ticket: http://dev.jqueryui.com/ticket/3863 Finally, if you're using the latest rc it would be a great help if you could upload a minimal test page somewhere. Thanks! On Fri, Feb 6, 2009 at 11:31 PM, Dayson Pais percy.p...@gmail.com wrote: Hi, I have a Datepicker UI linked to a textbox using the following code: $(document).ready(function(){ txtDOB = $(input[name=txtDOB]); txtDOB.datepicker(); }); Screenshot of the Textbox: http://arch.kimag.es/share/85588260.jpg When I click on the textbox, the calendar opens at an unexpected location as seen in this picture Firefox appears over textbox: http://arch.kimag.es/share/34288230.jpg Chrome Working Fine: http://arch.kimag.es/share/75291561.jpg It works fine in Chrome. I really can't figure out why this is happening.. It works perfectly if the textbox is placed in the top regions of the page. The Actual Problem in a practical situation is here: http://arch.kimag.es/share/66324568.jpg I need this resolved as I really don't want to use a calendar component from some other module if jquery has it. Thanks -- Ca-Phun Ung + http://yelotofu.com + hongkong, zce, jquery, php, css, html
[jQuery] Re: DatePicker not working--how to debug?
On Tue, Feb 3, 2009 at 1:27 AM, brian bally.z...@gmail.com wrote: On Mon, Feb 2, 2009 at 11:55 PM, Richard D. Worth rdwo...@gmail.com wrote: This worked for me no problem http://paste.pocoo.org/show/102539/ - Richard Thanks for following up. This is too strange. Each test I made, I checked that everything was loaded (no bad filenames) and jquery was there. I'll open these files in FF3 tomorrow. If that works fine, I'll go back and cross-check everything again. If FF2 still gives me problems, I'll post something to trac. (I don't know, offhand, if FF2 is even still supported) I've just checked this in FF3.0.5 and it works great. jquery-1.3.1.min ui.core.min ui.datepicker.min Also, there are no CSS issues that I can see. I'll go back later to FF2 and see if I can find anything else out.
[jQuery] Re: DatePicker not working--how to debug?
Are your UI image and language (i18n) files somewhere in there also? I'm not sure if they're required, but put them in. Do you have more than one elements with the DatePicker class? Maybe try using $(#foo).datepicker(); to see if it works. On Feb 2, 8:23 am, brian bally.z...@gmail.com wrote: I'm struggling to figure out why DatePicker is not working for me. I'm including the following files (and they're all loading fine). Is there yet another file required? ui.core.css ui.theme.css ui.datepicker.css jquery-1.3.1.min.js jquery-ui-1.6rc5.min.js jquery-ui-datepicker-1.6rc5.min.js The form input looks like so: input type=text name=foobar id=foo class=DatePicker / The following has no effect at all (including errors): $(document).ready(function(){ $(.DatePicker).datepicker(); }); If I change the above to this, the alert properly shows foo. $(document).ready(function(){ $(.DatePicker).each(function(){alert(this.id);}); }); Can someone suggest some way to go about debugging this?
[jQuery] Re: DatePicker not working--how to debug?
On Mon, Feb 2, 2009 at 1:23 PM, brian bally.z...@gmail.com wrote: I'm struggling to figure out why DatePicker is not working for me. I'm including the following files (and they're all loading fine). Is there yet another file required? ui.core.css ui.theme.css ui.datepicker.css jquery-1.3.1.min.js jquery-ui-1.6rc5.min.js jquery-ui-datepicker-1.6rc5.min.js Perhaps you've got one too many script files? Try these two http://jquery-ui.googlecode.com/svn/tags/testing/jquery-1.3.1.js http://jquery-ui.googlecode.com/svn/tags/testing/ui/jquery.ui.all.js - Richard
[jQuery] Re: DatePicker not working--how to debug?
On Mon, Feb 2, 2009 at 9:02 PM, Richard D. Worth rdwo...@gmail.com wrote: On Mon, Feb 2, 2009 at 1:23 PM, brian bally.z...@gmail.com wrote: I'm struggling to figure out why DatePicker is not working for me. I'm including the following files (and they're all loading fine). Is there yet another file required? ui.core.css ui.theme.css ui.datepicker.css jquery-1.3.1.min.js jquery-ui-1.6rc5.min.js jquery-ui-datepicker-1.6rc5.min.js Perhaps you've got one too many script files? Try these two http://jquery-ui.googlecode.com/svn/tags/testing/jquery-1.3.1.js http://jquery-ui.googlecode.com/svn/tags/testing/ui/jquery.ui.all.js - Richard Getting somewhere. This works, after a fashion. It looks absolutely dreadful, but it works. It seems that I have some CSS issues to deal with. I also tried using these files: http://jquery-ui.googlecode.com/svn/tags/testing/ui/jquery.ui.core.js http://jquery-ui.googlecode.com/svn/tags/testing/ui/jquery.ui.datepicker.js That also did not work. So, is there maybe a dependency missing somewhere? And, while I'm on the subject, I have to say that the method for retrieving the UI files leaves a lot to be desired. It's great that they're offered pre-minified and everything. But, if one wants just the core and a couple of widgets, and to keep them as separate files, one needs to rename the 3 files, after extracting, from jquery-ui-personalized (or some such). It'd be nice if the files were named properly when not mixing widgets. I guess it's maybe an edge case, though. Maybe most people like to package them. Personally, I generally prefer to load just what I need. Or, maybe there should be an option to have them zipped up together, but as separate files. In any case, I'm going to toss out my goal of keeping to just the code I need and use the all file. That'll save what's left of my hair. Thanks for nudging me.
[jQuery] Re: DatePicker not working--how to debug?
Sounds like you'd be happy with the development bundle (see jqueryui.com top right for link). It's one zip file with all individual files named like ui.core.js ui.accordion.js ui.datepicker.js etc. You simply include the files you need. There are even minified versions of each individual file. - Richard On Mon, Feb 2, 2009 at 10:39 PM, brian bally.z...@gmail.com wrote: On Mon, Feb 2, 2009 at 9:02 PM, Richard D. Worth rdwo...@gmail.com wrote: On Mon, Feb 2, 2009 at 1:23 PM, brian bally.z...@gmail.com wrote: I'm struggling to figure out why DatePicker is not working for me. I'm including the following files (and they're all loading fine). Is there yet another file required? ui.core.css ui.theme.css ui.datepicker.css jquery-1.3.1.min.js jquery-ui-1.6rc5.min.js jquery-ui-datepicker-1.6rc5.min.js Perhaps you've got one too many script files? Try these two http://jquery-ui.googlecode.com/svn/tags/testing/jquery-1.3.1.js http://jquery-ui.googlecode.com/svn/tags/testing/ui/jquery.ui.all.js - Richard Getting somewhere. This works, after a fashion. It looks absolutely dreadful, but it works. It seems that I have some CSS issues to deal with. I also tried using these files: http://jquery-ui.googlecode.com/svn/tags/testing/ui/jquery.ui.core.js http://jquery-ui.googlecode.com/svn/tags/testing/ui/jquery.ui.datepicker.js That also did not work. So, is there maybe a dependency missing somewhere? And, while I'm on the subject, I have to say that the method for retrieving the UI files leaves a lot to be desired. It's great that they're offered pre-minified and everything. But, if one wants just the core and a couple of widgets, and to keep them as separate files, one needs to rename the 3 files, after extracting, from jquery-ui-personalized (or some such). It'd be nice if the files were named properly when not mixing widgets. I guess it's maybe an edge case, though. Maybe most people like to package them. Personally, I generally prefer to load just what I need. Or, maybe there should be an option to have them zipped up together, but as separate files. In any case, I'm going to toss out my goal of keeping to just the code I need and use the all file. That'll save what's left of my hair. Thanks for nudging me.
[jQuery] Re: DatePicker not working--how to debug?
On Mon, Feb 2, 2009 at 10:45 PM, Richard D. Worth rdwo...@gmail.com wrote: Sounds like you'd be happy with the development bundle (see jqueryui.com top right for link). It's one zip file with all individual files named like ui.core.js ui.accordion.js ui.datepicker.js etc. You simply include the files you need. There are even minified versions of each individual file. Thanks. I assumed (and you know what that's good for) that it was everything in one file. I guess that wouldn't make much sense, though. I actually just downloaded core, datepicker, and tabs in one file. This seems to work (albeit with the nasty css issues). So, I'm a bit confused as to why I couldn't get it to work with separate files from the SVN repos. Whatever, I'm going to put it down to a curse. As in, this page I'm working on is cursed. Or my client has cursed me. Or something.
[jQuery] Re: DatePicker not working--how to debug?
Something's wrong here. When I use the following files (from the dev bundle) it does not work: ui.core.min.js ui.datepicker.min.js When I substitute the personaized file (core, datepicker, tabs) it works jquery-ui-personalized-1.6rc6.min.js When, on a hunch, I went back to the individual files and added ui.tabs.min.js, it still did not work. However, I now (finally) am at least seeing an error: $(#date_from).datepicker is not a function I was getting no errors at all, earlier. I tried ui.all also with no luck. The only version that's working is the personalised package. This page is cursed, I tell you.
[jQuery] Re: DatePicker not working--how to debug?
This worked for me no problem http://paste.pocoo.org/show/102539/ - Richard On Mon, Feb 2, 2009 at 11:22 PM, brian bally.z...@gmail.com wrote: Something's wrong here. When I use the following files (from the dev bundle) it does not work: ui.core.min.js ui.datepicker.min.js When I substitute the personaized file (core, datepicker, tabs) it works jquery-ui-personalized-1.6rc6.min.js When, on a hunch, I went back to the individual files and added ui.tabs.min.js, it still did not work. However, I now (finally) am at least seeing an error: $(#date_from).datepicker is not a function I was getting no errors at all, earlier. I tried ui.all also with no luck. The only version that's working is the personalised package. This page is cursed, I tell you.
[jQuery] Re: DatePicker not working--how to debug?
On Mon, Feb 2, 2009 at 11:55 PM, Richard D. Worth rdwo...@gmail.com wrote: This worked for me no problem http://paste.pocoo.org/show/102539/ - Richard Thanks for following up. This is too strange. Each test I made, I checked that everything was loaded (no bad filenames) and jquery was there. I'll open these files in FF3 tomorrow. If that works fine, I'll go back and cross-check everything again. If FF2 still gives me problems, I'll post something to trac. (I don't know, offhand, if FF2 is even still supported) thanks for your help
[jQuery] Re: [datepicker] Offset problem
Which versions of jQuery and jQuery UI? This sounds like an issue that was fixed recently. Also, ensure you're using compatible versions jQuery UI 1.5.3 with jQuery 1.2.6 or jQuery UI 1.6rc5+ with jQuery 1.3+ Thanks. - Richard On Fri, Jan 30, 2009 at 12:07 AM, Schalk Neethling volume4.sch...@gmail.com wrote: Hi there all, I am using the latest version of jQuery-UI and in particular the datepicker. On the one site everything is perfect but now, using on another site, the datepicker opens up offset about 30px above the input field. I can interact with it and it does fill the correct field if a date is selected, just not sure why the offset is happening. Any ideas? Thanks, Schalk Neethling
[jQuery] Re: [datepicker] Offset problem
Thanks Richard, I will check the version. I might be using a to new version for my jQuery version. Richard D. Worth wrote: Which versions of jQuery and jQuery UI? This sounds like an issue that was fixed recently. Also, ensure you're using compatible versions jQuery UI 1.5.3 with jQuery 1.2.6 or jQuery UI 1.6rc5+ with jQuery 1.3+ Thanks. - Richard On Fri, Jan 30, 2009 at 12:07 AM, Schalk Neethling volume4.sch...@gmail.com mailto:volume4.sch...@gmail.com wrote: Hi there all, I am using the latest version of jQuery-UI and in particular the datepicker. On the one site everything is perfect but now, using on another site, the datepicker opens up offset about 30px above the input field. I can interact with it and it does fill the correct field if a date is selected, just not sure why the offset is happening. Any ideas? Thanks, Schalk Neethling begin:vcard fn:Schalk Neethling n:Neethling;Schalk org:Overt Strategy Consulting adr:Florauna;;Berg ave 642;Pretoria;Gauteng;0182;South Africa email;internet:sch...@overtstrategyconsulting.com title:President tel;work:+27125468436 x-mozilla-html:FALSE url:http://www.overtstrategyconsulting.com version:2.1 end:vcard
[jQuery] Re: datepicker css
update: if I use the 300 kilobyte js generated by the theme roller that basically includes all UI elements the styling is appearing fine. So I just need a themed download for the datepicker, not every UI component ever made. DAn On Jan 22, 3:12 pm, Dan B. dan.baugh...@gmail.com wrote: For some reason I am dying trying to get a datepicker setup with some decent CSS. Functionally, my datepicker is fine...it's just lacking the presentation the demonstrations always seem to have. I use the theme roller to download any of the gallery ones and then include the ui.datepicker.css in my page and my calendar is always transparent. I had this problem once before but then I just used another datepicker... How many css files do you need to get your datepicker to end up like the ones on the theme roller page? Maybe someone can steer me in the right direction here. Here is my input item: input id=datepicker type=text name=DOB id=DOB Here is my datepicker instantiation page: $(function(){$('#datepicker').datepicker();});
[jQuery] Re: datepicker css
Hi, Yes, the theme generated by Themeroller does give you all component CSS files but in your case you only need the following 3: ui.core.css ui.theme.css ui.datepicker.css Note: the order of the css files is important Thanks. On Thu, Jan 22, 2009 at 10:32 PM, Dan B. dan.baugh...@gmail.com wrote: update: if I use the 300 kilobyte js generated by the theme roller that basically includes all UI elements the styling is appearing fine. So I just need a themed download for the datepicker, not every UI component ever made. DAn On Jan 22, 3:12 pm, Dan B. dan.baugh...@gmail.com wrote: For some reason I am dying trying to get a datepicker setup with some decent CSS. Functionally, my datepicker is fine...it's just lacking the presentation the demonstrations always seem to have. I use the theme roller to download any of the gallery ones and then include the ui.datepicker.css in my page and my calendar is always transparent. I had this problem once before but then I just used another datepicker... How many css files do you need to get your datepicker to end up like the ones on the theme roller page? Maybe someone can steer me in the right direction here. Here is my input item: input id=datepicker type=text name=DOB id=DOB Here is my datepicker instantiation page: $(function(){$('#datepicker').datepicker();}); -- Ca-Phun Ung + http://yelotofu.com + hongkong, zce, jquery, php, css, html
[jQuery] Re: datepicker not showing up
jQuery UI 1.5.x is not be supported with jQuery 1.3. Also it looks like you're using ThemeRoller v2 with jQuery UI 1.5.3 - Use the link below the ThemeRoller generator at http://ui.jquery.com/themerollerto download themes for jQuery UI 1.5.x On Wed, Jan 21, 2009 at 3:53 AM, Ryan W. wal...@gmail.com wrote: I've been having this problem trying to get my CSS to show up for the datepicker widget using JQuery UI. As far as functionality goes the datpicker works yet I can't get the CSS to show up. I'm using themeroller to style the the datepicker and using the following style sheets. uicore.css uitheme.css uidatepicker.css My initial thoughts were I had the wrong path two the style sheets yet I managed to get new selectors in those style sheets to show up. Am I missing something? I'm using jquery 1.3 and jquery ui 1.5.3. -- Ca-Phun Ung + http://yelotofu.com + hongkong, zce, jquery, php, css, html
[jQuery] Re: datepicker is not a function
Which javascript files have you included? And have you verified (perhaps using Firebug) that the paths are valid and they are being loaded? Also, the order is significant. They should be loaded in this order jquery.js ui.core.js ui.datepicker.js - Richard On Thu, Jan 15, 2009 at 4:24 AM, divsystem divsys...@gmail.com wrote: $('.Datepicker1').datepicker({beforeShow: customRange, rangeSelect: true, numberOfMonths: 2}); function customRange(input) { return { minDate: (input.id == startDatepicker ? $ (#endDatepicker).datepick(getDate) : null), maxDate: (input.id == endDatepicker ? $ (#startDatepicker).datepick(getDate) : null) }; } pstartDate: input type=text id=startDatepicker class = Datepicker1/p pendDate: input type=text id=endDatepicker class = Datepicker1/p
[jQuery] Re: datepicker is not a function
Ah, now that I look at your code again, you've got .datepicker(options) in one place, that looks right. Below you have .datepick(getDate) That should be .datepicker(getDate) - Richard On Thu, Jan 15, 2009 at 4:24 AM, divsystem divsys...@gmail.com wrote: $('.Datepicker1').datepicker({beforeShow: customRange, rangeSelect: true, numberOfMonths: 2}); function customRange(input) { return { minDate: (input.id == startDatepicker ? $ (#endDatepicker).datepick(getDate) : null), maxDate: (input.id == endDatepicker ? $ (#startDatepicker).datepick(getDate) : null) }; } pstartDate: input type=text id=startDatepicker class = Datepicker1/p pendDate: input type=text id=endDatepicker class = Datepicker1/p
[jQuery] Re: datepicker and setdate
Well, that second selector is wrong to start with... shouldn't it be $ (#start) and not $(start) ? On Jan 14, 9:24 am, graphic...@googlemail.com graphic...@googlemail.com wrote: Hi, This setDate is driving me mad ! I can't set the date of the controls programatically. //create range datepickers $(#start , #end).datepicker({ showOn: button, buttonImage: images/calendar.gif, buttonImageOnly: true, beforeShow: customRange, hideIfNoPrevNext: true, showStatus: true, duration: , dateFormat: dd MM yy }).attr(readonly, readonly); $(start).datepicker(setDate, 10 Mar 2008); displays non-sense date such as 14 august 2014 Is there something I'm doing wrong ? Thanks
[jQuery] Re: datepicker and setdate
Sorry the error was in my post but not in my code. So yes it should be $(#start).datepicker(setDate, 10 Mar 2008); but that gives me non-sense date as mentioned in my first post. Any idea ? On 14 jan, 14:31, MorningZ morni...@gmail.com wrote: Well, that second selector is wrong to start with... shouldn't it be $ (#start) and not $(start) ? On Jan 14, 9:24 am, graphic...@googlemail.com graphic...@googlemail.com wrote: Hi, This setDate is driving me mad ! I can't set the date of the controls programatically. //create range datepickers $(#start , #end).datepicker({ showOn: button, buttonImage: images/calendar.gif, buttonImageOnly: true, beforeShow: customRange, hideIfNoPrevNext: true, showStatus: true, duration: , dateFormat: dd MM yy }).attr(readonly, readonly); $(start).datepicker(setDate, 10 Mar 2008); displays non-sense date such as 14 august 2014 Is there something I'm doing wrong ? Thanks
[jQuery] Re: datepicker and setdate
Hmm... well.. you have this declared dateFormat: dd MM yy and you say you want to set it to 10 Mar 2008 The format is looking for a 2-digit year, your value is a 4 digit year, i'd say that would be an issue and could be the cause of your unexpected result also, what about simply setting the value of the textbox if fixing the format/value mixup doesn't work $(#start).val(10 Mar 2008); On Jan 14, 11:00 am, graphic...@googlemail.com graphic...@googlemail.com wrote: Sorry the error was in my post but not in my code. So yes it should be $(#start).datepicker(setDate, 10 Mar 2008); but that gives me non-sense date as mentioned in my first post. Any idea ? On 14 jan, 14:31, MorningZ morni...@gmail.com wrote: Well, that second selector is wrong to start with... shouldn't it be $ (#start) and not $(start) ? On Jan 14, 9:24 am, graphic...@googlemail.com graphic...@googlemail.com wrote: Hi, This setDate is driving me mad ! I can't set the date of the controls programatically. //create range datepickers $(#start , #end).datepicker({ showOn: button, buttonImage: images/calendar.gif, buttonImageOnly: true, beforeShow: customRange, hideIfNoPrevNext: true, showStatus: true, duration: , dateFormat: dd MM yy }).attr(readonly, readonly); $(start).datepicker(setDate, 10 Mar 2008); displays non-sense date such as 14 august 2014 Is there something I'm doing wrong ? Thanks
[jQuery] Re: datepicker and setdate
Yes, you are so right ! Just setting the textbox value is enough ! Many thanks ! On 14 jan, 16:23, MorningZ morni...@gmail.com wrote: Hmm... well.. you have this declared dateFormat: dd MM yy and you say you want to set it to 10 Mar 2008 The format is looking for a 2-digit year, your value is a 4 digit year, i'd say that would be an issue and could be the cause of your unexpected result also, what about simply setting the value of the textbox if fixing the format/value mixup doesn't work $(#start).val(10 Mar 2008); On Jan 14, 11:00 am, graphic...@googlemail.com graphic...@googlemail.com wrote: Sorry the error was in my post but not in my code. So yes it should be $(#start).datepicker(setDate, 10 Mar 2008); but that gives me non-sense date as mentioned in my first post. Any idea ? On 14 jan, 14:31, MorningZ morni...@gmail.com wrote: Well, that second selector is wrong to start with... shouldn't it be $ (#start) and not $(start) ? On Jan 14, 9:24 am, graphic...@googlemail.com graphic...@googlemail.com wrote: Hi, This setDate is driving me mad ! I can't set the date of the controls programatically. //create range datepickers $(#start , #end).datepicker({ showOn: button, buttonImage: images/calendar.gif, buttonImageOnly: true, beforeShow: customRange, hideIfNoPrevNext: true, showStatus: true, duration: , dateFormat: dd MM yy }).attr(readonly, readonly); $(start).datepicker(setDate, 10 Mar 2008); displays non-sense date such as 14 august 2014 Is there something I'm doing wrong ? Thanks
[jQuery] Re: datepicker and highlight current day
If you mean today's date, the css class is ui-datepicker-today If you mean the current selected date, the css class is ui-datepicker-current-day So to highlight either of those, you can simply use css. Here's how the default UI datepicker theme does so: .ui-datepicker-today { background: #fcc !important; } .ui-datepicker-current-day { background: #999 !important; } - Richard On Fri, Dec 5, 2008 at 11:47 AM, fabrice.regnier [EMAIL PROTECTED]wrote: Hi, I can't find the option of datepicker that could highlight the current day when i open a calendar. Any idea ? thanks in advance, regards, f.
[jQuery] Re: datePicker with rjs (on rails)
I GIVE UP. after a whole day trying to solve it (and sevral posts around the web without answer) I will implement it without jquery and ajax stuff. Have a good 1! On Oct 27, 12:41 pm, macsig [EMAIL PROTECTED] wrote: UP, Please, any idea about that ? THANK YOU On Oct 26, 6:38 pm, macsig [EMAIL PROTECTED] wrote: Hello folks, I'm struggling with datePicker when I need to load it within a RJS file. Basically I have a drop-down menu and according to the selected value I display some form fields (rendering a partial for selected value within a RJS file); one of those has to be the datepicker but I can't correctly load it. the rjs looks like ... @tasks.each do |task| page.insert_html :bottom, :tasks, :partial = 'tasks/task' end ... and the partial looks like % fields_for project[task_attributes][], task do |t_form| % ... input name=date2 id=date2 class=date-pick / ... I tried to load the picker within the RJS page $(function() {$('.date-pick').datePicker();}); and I tried to load it within the partial script type=\text/javascript\ $j(function() {$j('.date-pick').datePicker();}); /script % fields_for project[task_attributes][], task do |t_form| % but in neither cases it works. How can I correctly load it? THANK YOU, I APPRECIATE YOUR HELP have a hood 1!
[jQuery] Re: datePicker with rjs (on rails)
UP, Please, any idea about that ? THANK YOU On Oct 26, 6:38 pm, macsig [EMAIL PROTECTED] wrote: Hello folks, I'm struggling with datePicker when I need to load it within a RJS file. Basically I have a drop-down menu and according to the selected value I display some form fields (rendering a partial for selected value within a RJS file); one of those has to be the datepicker but I can't correctly load it. the rjs looks like ... @tasks.each do |task| page.insert_html :bottom, :tasks, :partial = 'tasks/task' end ... and the partial looks like % fields_for project[task_attributes][], task do |t_form| % ... input name=date2 id=date2 class=date-pick / ... I tried to load the picker within the RJS page $(function() {$('.date-pick').datePicker();}); and I tried to load it within the partial script type=\text/javascript\ $j(function() {$j('.date-pick').datePicker();}); /script % fields_for project[task_attributes][], task do |t_form| % but in neither cases it works. How can I correctly load it? THANK YOU, I APPRECIATE YOUR HELP have a hood 1!
[jQuery] Re: datepicker plugin: question regarding date range
I've just started using the javascript .addMonth(1) function for adding a month to the selected date. It is working flawlessly so far. I took a look for a subtractDay() function, but haven't found much. Apparently you can use a php type date function in javascript [code] d = new Date(d.getYear(),d.getMonth(),d.getDate()+90) [/code] This page gives a bunch of info on manipulating dates in javascript. As far as I've seen there isn't a simple jquery-esque way of manipulating dates, but you can easily mix both jquery and javascript. http://bytes.com/forum/thread150917.html Hope it helps, Pete On Sep 23, 10:29 pm, c.s [EMAIL PROTECTED] wrote: how do i get datepicker to display 5 days previous from date selected? bascially date range but i don't want to set it for being between specific dates. the fuctionality i'm looking for is user selects today date...date picker shows today's date and 4/5 days prior--i need to be able to retrieve this data...date picker pass it somehow? is this sort of functionality available or do i need to write the code for it? i'm still wadding around jquerythanks for patience
[jQuery] Re: datepicker setDate
On Mon, Jun 9, 2008 at 4:20 AM, andrea varnier [EMAIL PROTECTED] wrote: On 8 Giu, 05:36, mark [EMAIL PROTECTED] wrote: but if i do this $('#date').datepicker(setDate, new Date ( January 6, 1972 )); try adding curly braces, to define an object, like this: $('#date').datepicker({defaultDate: new Date ( January 6, 1972 )}); that did the trick! thanks
[jQuery] Re: datepicker setDate
On 8 Giu, 05:36, mark [EMAIL PROTECTED] wrote: but if i do this $('#date').datepicker(setDate, new Date ( January 6, 1972 )); try adding curly braces, to define an object, like this: $('#date').datepicker({defaultDate: new Date ( January 6, 1972 )});
[jQuery] Re: datepicker select to update a div, and strange datepicker css issue
Hi, It looks like you are converting the Date object to a string by adding a space to the start of it. Instead you should use the methods available on the Date object itself. So something like this should work: $('.holdDate').html(selectedDate.asString()); (the asString method is defined in date.js and will format your date according to the Date.format you have set). Alternatively you can use the native methods of the date object: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Date Hope that helps, Kelvin :) pedalpete wrote: I've made some progress with this, but my code is looking really strange. To rehash, I am trying to get the datepicker to update a span, not an input. But i was getting an error. Now I can update the span, but I can't split the date variable before I update (it gives blank time and gmt details that I don't need anyway). For some reason I have to have a space before the selectedDate variable, or it isn't recognized and i get an error. Anybody know why this is? Here's my working code... [code] $('.dateItem') .datePicker({inline:true}) .bind( 'dateSelected', function(e, selectedDate, $td) { var getDate = ' '+selectedDate; var splitDate = getDate.split(00:00:00); $('.holdDate').html(splitDate[0]); } ); [/code]
[jQuery] Re: datepicker select to update a div, and strange datepicker css issue
that's great kevin, Thank you. i didn't realize the selectedDate wasn't a string, i thought if i put var x=xyz, that makes it a string. I'm still fairly new to programming and learning lots. Thanks for your help, I hope I understood that correctly. Pete
[jQuery] Re: datepicker select to update a div, and strange datepicker css issue
I've made some progress with this, but my code is looking really strange. To rehash, I am trying to get the datepicker to update a span, not an input. But i was getting an error. Now I can update the span, but I can't split the date variable before I update (it gives blank time and gmt details that I don't need anyway). For some reason I have to have a space before the selectedDate variable, or it isn't recognized and i get an error. Anybody know why this is? Here's my working code... [code] $('.dateItem') .datePicker({inline:true}) .bind( 'dateSelected', function(e, selectedDate, $td) { var getDate = ' '+selectedDate; var splitDate = getDate.split(00:00:00); $('.holdDate').html(splitDate[0]); } ); [/code]
[jQuery] Re: Datepicker Range
So I have two text fields in a form I've created which will constitute a date range. I want to use the datepicker(change, settings) function to change the min or max date of the field when a date is selected. Example: User selects: 4/10/2008 in 'from' datepicker. onSelect should then change the minDate value for the 'to' datepicker to 4/10/2008. and vice versa: User selects: 4/10/2008 in 'to' datepicker. onSelect should then change the maxDate value for the 'from' datepicker to 4/10/2008. Is this possible?
[jQuery] Re: datepicker
For the first: As long as you do not explicitly set the maxDate option (http:// docs.jquery.com/UI/Datepicker/datepicker#options), there isn't any problem selecting dates in the future For the second: I'm no expert on the datepicker and all it's inner workings and that, but if i had to do what you request and had to have it done fast, i'd tie into the onSelect method, use javascript's .getDay() method to see if it's 0 (for Sunday) or 3 (Weds) and if it's not, clear out the value of the textbox On Mar 7, 2:28 pm, Ahmad [EMAIL PROTECTED] wrote: Hello, Is there a way to make the datepicker select future dates? Is there a way to make the datepicker select specific days (ex. Sundays and Wednesdays only) ? Thanks
[jQuery] Re: Datepicker showon link click
Hi Roman, I thought clicking a link with datepicker was the default. I've got it working with this [ code] $('.date-pick').datePicker({clickInput:true}); [/code] class=date-pick is assigned to an input field that I have hidden with the css, so only the default text is shown. The default text is defined in the datepicker.js with the TEXT_CHOOSE_DATE option. I hope that helps Pete
[jQuery] Re: Datepicker and autocomplete not playing nice together?
Shawn, What is the order in which you're importing the js files? Dan On Dec 3, 7:12 pm, Shawn [EMAIL PROTECTED] wrote: Sorry, maybe this was misleading. I have a form that looks something like so: Employee: Start Date: ___ # The employee field would be the autocomplete field, and the start date would have the date picker. With the dimensions plugin, the calendar will slide down properly below the date field, but then snap above it. Not a very large problem - unless the date field is near the top of the page causing the calendar DIV to have a negative value for it's TOP position. (making it partly hidden and not accessible). Turning off the dimensions plugin (removing the script include) makes the date-picker work properly but now I'm getting the list.scrollTop error when doing the autocomplete on the employee field. I'm digging through my CSS files to make sure I haven't done something bone-headed, but so far it seems proper... Thanks for the input. Shawn Dan M wrote: Shawn, Are you able to turn off the auto complete for your date picker fields? I couldn't see it being very useful there anyway... Dan On Dec 3, 12:22 am, Shawn [EMAIL PROTECTED] wrote: I have a couple of forms that require both an autocomplete field, and a date picker field. I'm using the ui.datepicker and Jorn's autocomplete. The problem is that Jorn's autocomplete requires the dimensions plugin. When the dimensions plug in is in place, the datepicker is getting given the wrong values for the top position of the calendar. If I take the dimension plugin out, the calendar behaves properly, but the autocomplete throws an error. ( list.scrollTop is not a function ). With dimensions, the calendar slides down as usual, but once sliding is complete the calendar snaps above the text box - with parts of the calendar off the visible area of the page (i.e. hiding behind the toolbars). Any simple way to resolve this? Shawn
[jQuery] Re: Datepicker and autocomplete not playing nice together?
Shawn, Are you able to turn off the auto complete for your date picker fields? I couldn't see it being very useful there anyway... Dan On Dec 3, 12:22 am, Shawn [EMAIL PROTECTED] wrote: I have a couple of forms that require both an autocomplete field, and a date picker field. I'm using the ui.datepicker and Jorn's autocomplete. The problem is that Jorn's autocomplete requires the dimensions plugin. When the dimensions plug in is in place, the datepicker is getting given the wrong values for the top position of the calendar. If I take the dimension plugin out, the calendar behaves properly, but the autocomplete throws an error. ( list.scrollTop is not a function ). With dimensions, the calendar slides down as usual, but once sliding is complete the calendar snaps above the text box - with parts of the calendar off the visible area of the page (i.e. hiding behind the toolbars). Any simple way to resolve this? Shawn
[jQuery] Re: Datepicker and autocomplete not playing nice together?
Sorry, maybe this was misleading. I have a form that looks something like so: Employee: Start Date: ___ # The employee field would be the autocomplete field, and the start date would have the date picker. With the dimensions plugin, the calendar will slide down properly below the date field, but then snap above it. Not a very large problem - unless the date field is near the top of the page causing the calendar DIV to have a negative value for it's TOP position. (making it partly hidden and not accessible). Turning off the dimensions plugin (removing the script include) makes the date-picker work properly but now I'm getting the list.scrollTop error when doing the autocomplete on the employee field. I'm digging through my CSS files to make sure I haven't done something bone-headed, but so far it seems proper... Thanks for the input. Shawn Dan M wrote: Shawn, Are you able to turn off the auto complete for your date picker fields? I couldn't see it being very useful there anyway... Dan On Dec 3, 12:22 am, Shawn [EMAIL PROTECTED] wrote: I have a couple of forms that require both an autocomplete field, and a date picker field. I'm using the ui.datepicker and Jorn's autocomplete. The problem is that Jorn's autocomplete requires the dimensions plugin. When the dimensions plug in is in place, the datepicker is getting given the wrong values for the top position of the calendar. If I take the dimension plugin out, the calendar behaves properly, but the autocomplete throws an error. ( list.scrollTop is not a function ). With dimensions, the calendar slides down as usual, but once sliding is complete the calendar snaps above the text box - with parts of the calendar off the visible area of the page (i.e. hiding behind the toolbars). Any simple way to resolve this? Shawn
[jQuery] Re: Datepicker bug in latest Opera
Hi Klaus, Thanks for the detailed report and fix! I've rolled this into the date picker and made a new release (2.1.1) with the fixed code: http://jquery.com/plugins/project/datePicker Thanks again, Kelvin :) Klaus Hartl wrote: Hi, I just came across a hard to find bug in Opera 9.23 (Win), that made the datepicker not work properly. In short, Opera failed on number- only keys in objects, even if you convert the number to a string*. Thus I made some changes to use the date as a string itself, which worked properly with Firefox 2, Opera 9.23, Safari 2 3, IE 6 7... Changes were made in the selected date getter and setter and is methods: *** setSelected: this.selectedDates[d.getTime()] = v; = this.selectedDates[d.toString()] = v; *** isSelected: return this.selectedDates[t]; = return this.selectedDates[d.toString()]; (exchanged argument t with d to indicate a date) getSelected: r.push(new Date(Number(t))); = r.push(new Date(Date.parse(s))); (exchanged t with s to indicate a string) * did not work: d.getTime() + '' did work: d.getTime() + '_foo' --Klaus
[jQuery] Re: Datepicker. Hide dates from next/prev month
CSS: table.jCalendar td.other-month { visibility: hidden; } - Brian Hi all. Right now the default behaviour of Kevin's datepicker, http://kelvinluck.com/assets/jquery/datePicker/v2/demo/, is to show the dates from the previous/next month as well as the dates from the current month. What would be the easy way to make the datepicker show the dates from the current month only? Thank you
[jQuery] Re: datePicker: How to allow choosing dates in the past?
Thanks Kelvin, That worked perfectly. I guess I should have tried it before I posted to list! I assumed that it would set the start date of the calendar to that date rather than allow you to select dates in the past. -Marshall Kelvin Luck wrote: Hi, Very short answer because I'm in a rush... But have you looked at the startDate parameter to datePicker? It's covered in the documentation [1] although I there isn't a simple example up yet (I'll add it when I have a minute or two free). Actually, stop press!! There is an error in the documentation of startDate, it expects a String, not a Date. The string should be formatted according to your current date format. If you need to dynamically change the start date try the dpSetStartDate method - you can see this in action on the start and end date pickers example [2]. Hope that helps, Kelvin :) [1] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.html [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html Marshall Salinger wrote: Hello, I am looking into using the super awesome datePicker v2 http://kelvinluck.com/assets/jquery/datePicker/v2/demo/ plug-in by Kelvin Luck, for an app that needs to be able to select a range from the past to the present. I am not clear on what the easiest way to do this is. Any advice is much appreciated. Thanks, Marshall
[jQuery] Re: datePicker: How to allow choosing dates in the past?
Hi, Very short answer because I'm in a rush... But have you looked at the startDate parameter to datePicker? It's covered in the documentation [1] although I there isn't a simple example up yet (I'll add it when I have a minute or two free). Actually, stop press!! There is an error in the documentation of startDate, it expects a String, not a Date. The string should be formatted according to your current date format. If you need to dynamically change the start date try the dpSetStartDate method - you can see this in action on the start and end date pickers example [2]. Hope that helps, Kelvin :) [1] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.html [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html Marshall Salinger wrote: Hello, I am looking into using the super awesome datePicker v2 http://kelvinluck.com/assets/jquery/datePicker/v2/demo/ plug-in by Kelvin Luck, for an app that needs to be able to select a range from the past to the present. I am not clear on what the easiest way to do this is. Any advice is much appreciated. Thanks, Marshall
[jQuery] Re: datePicker plugin inline
Thanks Rob. It looks promising. I'll give it a shot tomorrow at work. I'm not set on it being jQuery, just on it being not as buggy as the YUI thing is. :-/ On Thursday 26 July 2007, Rob Desbois wrote: Larry, Try the dynarch calendar at http://www.dynarch.com/projects/calendar/ It's not jQuery but does the job and can most likely be ported to jQuery if desired. --rob On 7/26/07, Larry Garfield [EMAIL PROTECTED] wrote: Thanks, Kelvin. (And sorry about misspelling your name. g) I was afraid you were going to say that. Unfortunately my timeframe allowed for this project is measured in hours, not weeks, so I doubt I'd even have time to try and figure out how to do it myself. Is there a method that you think would work that you haven't tested yet, or is it just a non-available feature? Is there some alternate plugin you can recommend? Or some possible alternate interface that's similar that could be accomplished with datePicker? Thanks. --Larry Garfield On Thu, 26 Jul 2007 14:12:14 +0100, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid that it is currently exactly as you describe. A date picker calendar (with the paging etc) only exists as a popup and if you use renderCalendar then you don't get paging or anything. The ability to use a date picker not in a popup is one of the two additions I wanted to make before I stop calling the date picker v2 beta. Unfortunately I'm really busy at work at the moment and realistically it will probably be a couple of weeks before I get a chance to work on the date picker again. If you want to try and figure it out yourself then feel free and report back on your progress, otherwise if you can wait I'll try and get it done then, Cheers, Kelvin :) Larry Garfield wrote: Hello, jQuery. My apologies if this is a dupe; the first copy didn't seem to go through. I'm working with Kevin Luck's datePicker plugin, v2[1], because it seemed the least unsuited for what I was trying to do and I'm already using it elsewhere. What I'm trying to do is have an inline calendar grid rather than a popup, and have that inline grid offer paging and multi-select abilities. Then on submit, grab all of the selected dates and serialize them to a hidden field and submit. I'm replacing a YUI widget that did that, but did so only on certain systems when it was in certain moods, making it far too unreliable. According to the docs, I can get paging and multi-select in a popup easily[2]. I can also render an inline calendar instead[3]. What I have found no documentation on and have been unable to do myself is get both to happen at the same time. If I render my own calendar, it gets no paging, no select ability at all; it's really just a static read-only display. I've looked at the plugin's source, but haven't been able to find any indication of what I'd need to copy out or reference directly in order to get the picker parts of datePicker. Any tips on how to have my picker and see it, too, would be most appreciated. Samples of working code would be even better. : :-) Thanks. : [1] http://kelvinluck.com/assets/jquery/datePicker/v2/demo [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple .html [3] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.htm l -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson
[jQuery] Re: datePicker plugin inline
I looked at that yesterday. Unfortunately it's CC licensed non-commercial, and this is for a commercial project. (Custom app for a client.) On Thursday 26 July 2007, bbuchs wrote: Give this a shot: http://tedserbinski.com/jcalendar/index.html Inline calendar that ties to 3 select elements (m/d/y), with paging. On Jul 26, 10:45 am, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid I haven't got any alternative suggestions... If you only need one calendar on the page and don't need a popup one as well you could implement a temporary dodgy hack... You could look for the calls to close the calendar and just comment them out... It's not pretty but could get you out of a fix, Cheers, Kelvin :) Larry Garfield wrote: Thanks, Kelvin. (And sorry about misspelling your name. g) I was afraid you were going to say that. Unfortunately my timeframe allowed for this project is measured in hours, not weeks, so I doubt I'd even have time to try and figure out how to do it myself. Is there a method that you think would work that you haven't tested yet, or is it just a non-available feature? Is there some alternate plugin you can recommend? Or some possible alternate interface that's similar that could be accomplished with datePicker? Thanks. --Larry Garfield On Thu, 26 Jul 2007 14:12:14 +0100, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid that it is currently exactly as you describe. A date picker calendar (with the paging etc) only exists as a popup and if you use renderCalendar then you don't get paging or anything. The ability to use a date picker not in a popup is one of the two additions I wanted to make before I stop calling the date picker v2 beta. Unfortunately I'm really busy at work at the moment and realistically it will probably be a couple of weeks before I get a chance to work on the date picker again. If you want to try and figure it out yourself then feel free and report back on your progress, otherwise if you can wait I'll try and get it done then, Cheers, Kelvin :) Larry Garfield wrote: Hello, jQuery. My apologies if this is a dupe; the first copy didn't seem to go through. I'm working with Kevin Luck's datePicker plugin, v2[1], because it seemed the least unsuited for what I was trying to do and I'm already using it elsewhere. What I'm trying to do is have an inline calendar grid rather than a popup, and have that inline grid offer paging and multi-select abilities. Then on submit, grab all of the selected dates and serialize them to a hidden field and submit. I'm replacing a YUI widget that did that, but did so only on certain systems when it was in certain moods, making it far too unreliable. According to the docs, I can get paging and multi-select in a popup easily[2]. I can also render an inline calendar instead[3]. What I have found no documentation on and have been unable to do myself is get both to happen at the same time. If I render my own calendar, it gets no paging, no select ability at all; it's really just a static read-only display. I've looked at the plugin's source, but haven't been able to find any indication of what I'd need to copy out or reference directly in order to get the picker parts of datePicker. Any tips on how to have my picker and see it, too, would be most appreciated. Samples of working code would be even better. :-) Thanks. [1]http://kelvinluck.com/assets/jquery/datePicker/v2/demo [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMult.. . [3] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.. . -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson
[jQuery] Re: datePicker plugin inline
Hi, I'm afraid I haven't got any alternative suggestions... If you only need one calendar on the page and don't need a popup one as well you could implement a temporary dodgy hack... You could look for the calls to close the calendar and just comment them out... It's not pretty but could get you out of a fix, Cheers, Kelvin :) Larry Garfield wrote: Thanks, Kelvin. (And sorry about misspelling your name. g) I was afraid you were going to say that. Unfortunately my timeframe allowed for this project is measured in hours, not weeks, so I doubt I'd even have time to try and figure out how to do it myself. Is there a method that you think would work that you haven't tested yet, or is it just a non-available feature? Is there some alternate plugin you can recommend? Or some possible alternate interface that's similar that could be accomplished with datePicker? Thanks. --Larry Garfield On Thu, 26 Jul 2007 14:12:14 +0100, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid that it is currently exactly as you describe. A date picker calendar (with the paging etc) only exists as a popup and if you use renderCalendar then you don't get paging or anything. The ability to use a date picker not in a popup is one of the two additions I wanted to make before I stop calling the date picker v2 beta. Unfortunately I'm really busy at work at the moment and realistically it will probably be a couple of weeks before I get a chance to work on the date picker again. If you want to try and figure it out yourself then feel free and report back on your progress, otherwise if you can wait I'll try and get it done then, Cheers, Kelvin :) Larry Garfield wrote: Hello, jQuery. My apologies if this is a dupe; the first copy didn't seem to go through. I'm working with Kevin Luck's datePicker plugin, v2[1], because it seemed the least unsuited for what I was trying to do and I'm already using it elsewhere. What I'm trying to do is have an inline calendar grid rather than a popup, and have that inline grid offer paging and multi-select abilities. Then on submit, grab all of the selected dates and serialize them to a hidden field and submit. I'm replacing a YUI widget that did that, but did so only on certain systems when it was in certain moods, making it far too unreliable. According to the docs, I can get paging and multi-select in a popup easily[2]. I can also render an inline calendar instead[3]. What I have found no documentation on and have been unable to do myself is get both to happen at the same time. If I render my own calendar, it gets no paging, no select ability at all; it's really just a static read-only display. I've looked at the plugin's source, but haven't been able to find any indication of what I'd need to copy out or reference directly in order to get the picker parts of datePicker. Any tips on how to have my picker and see it, too, would be most appreciated. Samples of working code would be even better. :-) Thanks. [1] http://kelvinluck.com/assets/jquery/datePicker/v2/demo [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple.html [3] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.html
[jQuery] Re: datePicker plugin inline
Give this a shot: http://tedserbinski.com/jcalendar/index.html Inline calendar that ties to 3 select elements (m/d/y), with paging. On Jul 26, 10:45 am, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid I haven't got any alternative suggestions... If you only need one calendar on the page and don't need a popup one as well you could implement a temporary dodgy hack... You could look for the calls to close the calendar and just comment them out... It's not pretty but could get you out of a fix, Cheers, Kelvin :) Larry Garfield wrote: Thanks, Kelvin. (And sorry about misspelling your name. g) I was afraid you were going to say that. Unfortunately my timeframe allowed for this project is measured in hours, not weeks, so I doubt I'd even have time to try and figure out how to do it myself. Is there a method that you think would work that you haven't tested yet, or is it just a non-available feature? Is there some alternate plugin you can recommend? Or some possible alternate interface that's similar that could be accomplished with datePicker? Thanks. --Larry Garfield On Thu, 26 Jul 2007 14:12:14 +0100, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid that it is currently exactly as you describe. A date picker calendar (with the paging etc) only exists as a popup and if you use renderCalendar then you don't get paging or anything. The ability to use a date picker not in a popup is one of the two additions I wanted to make before I stop calling the date picker v2 beta. Unfortunately I'm really busy at work at the moment and realistically it will probably be a couple of weeks before I get a chance to work on the date picker again. If you want to try and figure it out yourself then feel free and report back on your progress, otherwise if you can wait I'll try and get it done then, Cheers, Kelvin :) Larry Garfield wrote: Hello, jQuery. My apologies if this is a dupe; the first copy didn't seem to go through. I'm working with Kevin Luck's datePicker plugin, v2[1], because it seemed the least unsuited for what I was trying to do and I'm already using it elsewhere. What I'm trying to do is have an inline calendar grid rather than a popup, and have that inline grid offer paging and multi-select abilities. Then on submit, grab all of the selected dates and serialize them to a hidden field and submit. I'm replacing a YUI widget that did that, but did so only on certain systems when it was in certain moods, making it far too unreliable. According to the docs, I can get paging and multi-select in a popup easily[2]. I can also render an inline calendar instead[3]. What I have found no documentation on and have been unable to do myself is get both to happen at the same time. If I render my own calendar, it gets no paging, no select ability at all; it's really just a static read-only display. I've looked at the plugin's source, but haven't been able to find any indication of what I'd need to copy out or reference directly in order to get the picker parts of datePicker. Any tips on how to have my picker and see it, too, would be most appreciated. Samples of working code would be even better. :-) Thanks. [1]http://kelvinluck.com/assets/jquery/datePicker/v2/demo [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMult... [3] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar...
[jQuery] Re: DatePicker | adding multiple selectedDates into input field
Figured it out! - At this part - console.log(selectedDates); - Just add... - console.log(selectedDates); $(this).val(selectedDates); However the only remaining issue is now I get very long dates. I get this: Fri Jul 20 2007 00:00:00 GMT-0400 (EDT), Sat Jul 21 2007 00:00:00 GMT-0400 (EDT) I would like: Fri Jul 20 2007, Sat Jul 21 2007 I would like to loose the Time information in the array of dates. Does anyone know how this could be done? On Jul 19, 8:23 pm, newbie [EMAIL PROTECTED] wrote: Hello all, Current Issue I currently have a form that offers users a date picker to select multiple dates. Currently the text field will only update it's self to show the last date selected. Does anyon know how I can take the array of selectedDates and update the textfield with the multiple dates once they close the calendar for that selected input ? If I had 3 dates selected ideally the input values would seperate each entry with a , and an example could look like 01/01/07, 01/02/07, 01/03/07. Code Below !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/ TR/html4/strict.dtd html lang=en head meta http-equiv=Content-Type content=text/html; charset=utf-8 titleuntitled/title !-- jQuery -- script type=text/javascript src=jquery-1.1.2.js/script !-- required plugins -- script type=text/javascript src=date.js/script script type=text/javascript src=jquery.dimensions.js/script !--[if IE]script type=text/javascript src=jquery.bgiframe.js/script![endif]-- !-- jquery.datePicker.js -- script type=text/javascript src=jquery.datePicker.js/script !-- datePicker required styles -- link rel=stylesheet type=text/css media=screen href=datePicker.css !-- page specific styles -- link rel=stylesheet type=text/css media=screen href=demo.css !-- page specific scripts -- script type=text/javascript charset=utf-8 $(function() { $('.date-pick') .datePicker( { createButton:true, displayClose:true, closeOnSelect:false, selectMultiple:true } ) .bind( 'click', function() { $(this).dpDisplay(); this.blur(); return false; } ) .bind( 'dateSelected', function(e, selectedDate, $td, state) { console.log('You ' + (state ? '' : 'un') // wrap + 'selected ' + selectedDate); } ) .bind( 'dpClosed', function(e, selectedDates) { console.log('You closed the date picker and the ' // wrap + 'currently selected dates are:'); console.log(selectedDates); }
[jQuery] Re: DatePicker | adding multiple selectedDates into input field
I have fixed the issue Solution At this line: console.log(selectedDates); Just add: console.log(selectedDates); (this).val(selectedDates); This will add the array of multiple dates back into text field. New problem --- How can I get rid of the rather long date format. Fri Jul 20 2007 00:00:00 GMT-0400 (EDT),Fri Jul 27 2007 00:00:00 GMT-0400 (EDT) I would like the values to be: Fri Jul 20 2007,Fri Jul 27 2007 Any hints from anyone? On Jul 19, 8:23 pm, newbie [EMAIL PROTECTED] wrote: Hello all, Current Issue I currently have a form that offers users a date picker to select multiple dates. Currently the text field will only update it's self to show the last date selected. Does anyon know how I can take the array of selectedDates and update the textfield with the multiple dates once they close the calendar for that selected input ? If I had 3 dates selected ideally the input values would seperate each entry with a , and an example could look like 01/01/07, 01/02/07, 01/03/07. Code Below !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/ TR/html4/strict.dtd html lang=en head meta http-equiv=Content-Type content=text/html; charset=utf-8 titleuntitled/title !-- jQuery -- script type=text/javascript src=jquery-1.1.2.js/script !-- required plugins -- script type=text/javascript src=date.js/script script type=text/javascript src=jquery.dimensions.js/script !--[if IE]script type=text/javascript src=jquery.bgiframe.js/script![endif]-- !-- jquery.datePicker.js -- script type=text/javascript src=jquery.datePicker.js/script !-- datePicker required styles -- link rel=stylesheet type=text/css media=screen href=datePicker.css !-- page specific styles -- link rel=stylesheet type=text/css media=screen href=demo.css !-- page specific scripts -- script type=text/javascript charset=utf-8 $(function() { $('.date-pick') .datePicker( { createButton:true, displayClose:true, closeOnSelect:false, selectMultiple:true } ) .bind( 'click', function() { $(this).dpDisplay(); this.blur(); return false; } ) .bind( 'dateSelected', function(e, selectedDate, $td, state) { console.log('You ' + (state ? '' : 'un') // wrap + 'selected ' + selectedDate); } ) .bind( 'dpClosed', function(e, selectedDates) { console.log('You closed the date picker and the ' // wrap + 'currently selected dates are:'); console.log(selectedDates); } ); });
[jQuery] Re: DatePicker | adding multiple selectedDates into input field
Hi, Try something like this: var datesString = ''; for (var i=0; iselectedDates.length; i++) { datesString += selectedDates[i].asString() + ', '; } datesString = datesString.substring(-2); $(this).val = datesString; Untested but should give you an idea of how to proceed, Cheers, Kelvin :) p.s. you can loose the console.log line too... newbie wrote: I have fixed the issue Solution At this line: console.log(selectedDates); Just add: console.log(selectedDates); (this).val(selectedDates); This will add the array of multiple dates back into text field. New problem --- How can I get rid of the rather long date format. Fri Jul 20 2007 00:00:00 GMT-0400 (EDT),Fri Jul 27 2007 00:00:00 GMT-0400 (EDT) I would like the values to be: Fri Jul 20 2007,Fri Jul 27 2007 Any hints from anyone?
[jQuery] Re: datePicker scoping question
Robert O'Rourke wrote: Glad to have the new version of jQuery out, the speed improvements are really nice. I'm trying it out with the datePicker plugin and it seems fine. I'm having trouble getting the datePicker to work with the linked select elements example. I'm trying to make it loop through the document looking for elements with a class of 'date-select' and then set up a scoped set of events on the descendant select boxes and anchor tag. There's a bit much code to post in the email here's a link to the page I'm working on: http://www.sanchothefat.com/dev/js/datepickertest.html As far as I can tell, using $('a', this) etc.. should work but I'm getting no js errors and no datePicker. Has anyone done something like this with the datePicker before? It's for generated date selects so this is the best solution for the job. Cheers, Rob Sorted it now, was a combination of muppetry and not understanding how $(this) works when a function is stored as a variable. If anyone wants the code help yourself, it's at the link above.
[jQuery] Re: datePicker v2 beta
Rob Desbois wrote: I disagree; in the interest of keeping the plugin small, to do this outside the class is equally minimal effort and I don't think the plugin should accept every possible representation. If you always use Date where String is required, you can overload and wrap the function to perform the conversion. I agree :) Kelvin: That said I think that given it's a *date*Picker, Date would be a far more appropriate choice for the interface than String. What made you choose String? In this instance I chose date to be consistent with dpSetStartDate and dpSetEndDate. I'm not 100% sure why I originally chose strings for those method's arguments... One possible reasons is because a string contains only date information (no time information). When I convert it to a Date object I convert it to midnight of that day and this is the specific date/time that is used for all comparisons. If you passed in a Date object I would need to .zeroTime it to make sure all the comparisons worked and avoid any possibly hard to track down bugs... Possibly not the best reason in the world, I'm open to suggestions if people feel there is a good reason to change it... Thanks for the feedback, Kelvin :) --rob On 6/6/07, *Brian Miller* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Just my opinion: both Date and String should be supported. It's probably only two lines of code to check for type, and cast to the other type if necessary. - Brian
[jQuery] Re: datePicker v2 beta
A tricky one...or perhaps not. My feeling is that the datePicker is there to replace not enhance the input field. I'm not overly pleased with the blur() method as it breaks tabbing between fields. I didn't know that autocomplete could be suppressed (thank you!), but I think that would be the most elegant solution. --rob On 6/6/07, Kelvin Luck [EMAIL PROTECTED] wrote: Rob Desbois wrote: I've had an issue in Firefox2.0 using the plugin with the 'clickInput' option turned on. When the input field has the focus, clicking on it to display the datePicker will work, but over the top of that will be Firefox's drop-down box showing previous inputs to that field. The solution I've used is to do this: $(#dateFrom) .datePicker(dpOptions) .click(function() { this.blur(); }); Don't know if anyone else has a better suggestion? Not sure if it would be appropriate to make this default behaviour for the plugin but it's there as a suggestion anyway :-) --rob Hi, I think that it might make sense to make the plugin disable autocomplete (set autocomplete=off on the input element) where clickInput = true... Do you think this would make sense? Then again, what about if a user tabs into the field and you want them to be able to autocomplete? If this is a consideration then maybe your suggestion is most elegant (and I can add the blur into the plugin). Does anyone have any suggestions on this? Cheers, Kelvin :) -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: datePicker v2 beta
Just my opinion: both Date and String should be supported. It's probably only two lines of code to check for type, and cast to the other type if necessary. - Brian There's a bug or documentation error with dpSetSelected() [revision #1993] : it's documented as taking a string, but the code for it requires a Date (due to using .getMonth(), .getFullYear() and .getTime()). To fix this problem I added the line d = new Date(d); to the start of dpSetSelected(). It's a documentation error. I'll update the documentation to explain that it expects a Date object (the change you made might have other unforseen consequences). Hi, Just an update on this... I've decided that the documentation was correct and so I've changed the function to behave as it described. dpSetSelected now expects a String as documented. I also fixed the other documentation errors you noticed, Sorry for any confusion and thanks for the report, Kelvin :)
[jQuery] Re: datePicker v2 beta
I disagree; in the interest of keeping the plugin small, to do this outside the class is equally minimal effort and I don't think the plugin should accept every possible representation. If you always use Date where String is required, you can overload and wrap the function to perform the conversion. Kelvin: That said I think that given it's a *date*Picker, Date would be a far more appropriate choice for the interface than String. What made you choose String? --rob On 6/6/07, Brian Miller [EMAIL PROTECTED] wrote: Just my opinion: both Date and String should be supported. It's probably only two lines of code to check for type, and cast to the other type if necessary. - Brian There's a bug or documentation error with dpSetSelected() [revision #1993] : it's documented as taking a string, but the code for it requires a Date (due to using .getMonth(), .getFullYear() and .getTime()). To fix this problem I added the line d = new Date(d); to the start of dpSetSelected(). It's a documentation error. I'll update the documentation to explain that it expects a Date object (the change you made might have other unforseen consequences). Hi, Just an update on this... I've decided that the documentation was correct and so I've changed the function to behave as it described. dpSetSelected now expects a String as documented. I also fixed the other documentation errors you noticed, Sorry for any confusion and thanks for the report, Kelvin :) -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: datePicker v2 beta
There's a bug or documentation error with dpSetSelected() [revision #1993] : it's documented as taking a string, but the code for it requires a Date (due to using .getMonth(), .getFullYear() and .getTime()). To fix this problem I added the line d = new Date(d); to the start of dpSetSelected(). It's a documentation error. I'll update the documentation to explain that it expects a Date object (the change you made might have other unforseen consequences). Hi, Just an update on this... I've decided that the documentation was correct and so I've changed the function to behave as it described. dpSetSelected now expects a String as documented. I also fixed the other documentation errors you noticed, Sorry for any confusion and thanks for the report, Kelvin :)
[jQuery] Re: datePicker v2 beta
Rob Desbois wrote: I've had an issue in Firefox2.0 using the plugin with the 'clickInput' option turned on. When the input field has the focus, clicking on it to display the datePicker will work, but over the top of that will be Firefox's drop-down box showing previous inputs to that field. The solution I've used is to do this: $(#dateFrom) .datePicker(dpOptions) .click(function() { this.blur(); }); Don't know if anyone else has a better suggestion? Not sure if it would be appropriate to make this default behaviour for the plugin but it's there as a suggestion anyway :-) --rob Hi, I think that it might make sense to make the plugin disable autocomplete (set autocomplete=off on the input element) where clickInput = true... Do you think this would make sense? Then again, what about if a user tabs into the field and you want them to be able to autocomplete? If this is a consideration then maybe your suggestion is most elegant (and I can add the blur into the plugin). Does anyone have any suggestions on this? Cheers, Kelvin :)
[jQuery] Re: datePicker v2 beta
I've had an issue in Firefox2.0 using the plugin with the 'clickInput' option turned on. When the input field has the focus, clicking on it to display the datePicker will work, but over the top of that will be Firefox's drop-down box showing previous inputs to that field. The solution I've used is to do this: $(#dateFrom) .datePicker(dpOptions) .click(function() { this.blur(); }); Don't know if anyone else has a better suggestion? Not sure if it would be appropriate to make this default behaviour for the plugin but it's there as a suggestion anyway :-) --rob On 6/1/07, Chris W. Parker [EMAIL PROTECTED] wrote: On Friday, June 01, 2007 1:11 PM gee said: E.g., instead of: Start date: [text input] [.png] The display appears as: Start date: [text input][.png] I gather it has something to do with using a float in the style declaration for a.dp-choose-date. Before I wade into experimenting with alternate style declarations, I am wondering if anyone else has already come up with a different markup that allows a label, text input, and date selector button to appear on the same line. I figured it out... :) In my case the solution was already stated on the demo page. :( You need to take the styles a.dp-choose-date, a.dp-choose-date.dp-disabled, and input.dp-applied from demo.css (or copied from the bottom of his demo page) into your datePicker.css file. You can keep the files separate but I prefer to keep all the datePicker styles in one file since I always use the icon. Hope this helps! Chris. -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: datePicker v2 beta
Well, I've finally taken the plunge and started playing with datePicker. Can I join everyone in thanking you for this excellent plugin. Suggestions for a few changes, mainly ones which increased the time it took for me to integrate it into a page without hacking the source: == Change the clickInput option to be clickElement instead == I wanted to use span as my datePicker element to prevent manual editing: forcing the use of a text input means making it disabled and re-enabling it on form submission, or using javascript to prevent modification. == Change the a created with createButton:true == I like the automatic creation of the a but dislike the default content being text and the image being background: it means either CSS is required to hide the content or JS to remove the content and CSS to display properly. I've had to resort to adding my own a in the HTML and setting its behaviour myself: a href=javascript:choose_date('dateFrom') img src=/images/calendar.gif alt=[choose date] / /a My suggestion would be to allow the content of the a to be set in the options if desired. Also, is there a particular reason why $.dpDisplay() returns a value? It means that to use it from the href of an a it has to be wrapped in another function call returning nothing to prevent the browser from navigating away when it's called from the href. Just as an aside: the first sentence of documentation of dpSetOffset() on http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.html is from the dpDisplay() function instead. Is datePicker v2 still considered to be in beta? Apologies for length, and many thanks for this damn good piece of kit :-) --rob On 5/21/07, tlphipps [EMAIL PROTECTED] wrote: Awesome! The packing and the hovering work great! Thanks for the amazing support. On May 20, 2:17 pm, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I've added support for this into the date picker: http://dev.jquery.com/changeset/1933#file2 As you can see, you can now pass a hoverClass to $().datePicker or $().renderCalendar which is added to each TD of the calendar as you hover over it. This defaults to dp-hover. You can also pass false if you don't want any class added to the TDs. Hope that helps, Kelvin :) tlphipps wrote: Another issue I've uncovered is related to the :hover effects. In your original date picker you were obviously using as because the hover effect worked correctly in IE. However, hovering doesn't work in v2 because of IE's quirkiness. Anybody have any input on how to get the :hover effect back in IE with v2? -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: datePicker v2 beta
Also, dpSetPosition() has the wrong first sentence too. There's a bug or documentation error with dpSetSelected() [revision #1993] : it's documented as taking a string, but the code for it requires a Date (due to using .getMonth(), .getFullYear() and .getTime()). To fix this problem I added the line d = new Date(d); to the start of dpSetSelected(). --rob On 6/1/07, Rob Desbois [EMAIL PROTECTED] wrote: Well, I've finally taken the plunge and started playing with datePicker. Can I join everyone in thanking you for this excellent plugin. Suggestions for a few changes, mainly ones which increased the time it took for me to integrate it into a page without hacking the source: == Change the clickInput option to be clickElement instead == I wanted to use span as my datePicker element to prevent manual editing: forcing the use of a text input means making it disabled and re-enabling it on form submission, or using javascript to prevent modification. == Change the a created with createButton:true == I like the automatic creation of the a but dislike the default content being text and the image being background: it means either CSS is required to hide the content or JS to remove the content and CSS to display properly. I've had to resort to adding my own a in the HTML and setting its behaviour myself: a href=javascript:choose_date('dateFrom') img src=/images/calendar.gif alt=[choose date] / /a My suggestion would be to allow the content of the a to be set in the options if desired. Also, is there a particular reason why $.dpDisplay() returns a value? It means that to use it from the href of an a it has to be wrapped in another function call returning nothing to prevent the browser from navigating away when it's called from the href. Just as an aside: the first sentence of documentation of dpSetOffset() on http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.html is from the dpDisplay() function instead. Is datePicker v2 still considered to be in beta? Apologies for length, and many thanks for this damn good piece of kit :-) --rob On 5/21/07, tlphipps [EMAIL PROTECTED] wrote: Awesome! The packing and the hovering work great! Thanks for the amazing support. On May 20, 2:17 pm, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I've added support for this into the date picker: http://dev.jquery.com/changeset/1933#file2 As you can see, you can now pass a hoverClass to $().datePicker or $().renderCalendar which is added to each TD of the calendar as you hover over it. This defaults to dp-hover. You can also pass false if you don't want any class added to the TDs. Hope that helps, Kelvin :) tlphipps wrote: Another issue I've uncovered is related to the :hover effects. In your original date picker you were obviously using as because the hover effect worked correctly in IE. However, hovering doesn't work in v2 because of IE's quirkiness. Anybody have any input on how to get the :hover effect back in IE with v2? -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome. -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: datePicker v2 beta
Hello again! Rob Desbois wrote: Also, dpSetPosition() has the wrong first sentence too. Thanks - I'll fix that too. There's a bug or documentation error with dpSetSelected() [revision #1993] : it's documented as taking a string, but the code for it requires a Date (due to using .getMonth(), .getFullYear() and .getTime()). To fix this problem I added the line d = new Date(d); to the start of dpSetSelected(). It's a documentation error. I'll update the documentation to explain that it expects a Date object (the change you made might have other unforseen consequences). Thanks for tracking down those problems, Cheers, Kelvin :)
[jQuery] Re: datePicker v2 beta
(I clumsily posted this as a new topic yesterday (http:// groups.google.com/group/jquery-en/browse_thread/thread/ b8471b7990296b12?hl=en); I am reposting it here -- hopefully in the correct thread -- with advance apologies for the clutter.) Great work! An issue I have experienced with both the original datePicker and v2 involves the date's text input field breaking to a new line when using a button to trigger datePicker instead of the Choose date text. E.g., instead of: Start date: [text input] [.png] The display appears as: Start date: [text input][.png] I gather it has something to do with using a float in the style declaration for a.dp-choose-date. Before I wade into experimenting with alternate style declarations, I am wondering if anyone else has already come up with a different markup that allows a label, text input, and date selector button to appear on the same line.
[jQuery] Re: datePicker v2 beta
On Friday, June 01, 2007 1:11 PM gee said: E.g., instead of: Start date: [text input] [.png] The display appears as: Start date: [text input][.png] I gather it has something to do with using a float in the style declaration for a.dp-choose-date. Before I wade into experimenting with alternate style declarations, I am wondering if anyone else has already come up with a different markup that allows a label, text input, and date selector button to appear on the same line. I figured it out... :) In my case the solution was already stated on the demo page. :( You need to take the styles a.dp-choose-date, a.dp-choose-date.dp-disabled, and input.dp-applied from demo.css (or copied from the bottom of his demo page) into your datePicker.css file. You can keep the files separate but I prefer to keep all the datePicker styles in one file since I always use the icon. Hope this helps! Chris.
[jQuery] Re: datePicker calendar icon dropping below input
Chris, I think my issue is slightly different: I am trying to get label text to show on the same line as the input field and datePicker button. E.g., (and hope the markup makes it through here) plabel for=startDateStart date /labelinput type=text name=startDate class=datePickerField //p Displays as Start date [input][button] ...instead of the desired... Start date [input][button] I too am using the same CSS as on the demo -- and like you I placed it in my master datePicker style sheet :-). This afternoon my experimental attempt to route around the problem is to apply a float to the label element that surrounds the, you know, label. This is working in some cases, not so well in other layouts. I'm one of those masochistic types who avoids using tables for layout -- even on forms. Instead I use the delightfully ambiguous definition list element (dl) and some strategic classes on the label elements (when needed). Otherwise I would just put the label and the text input in separate table cells.
[jQuery] Re: datePicker calendar icon dropping below input
On Friday, June 01, 2007 3:44 PM Gee Starr said: Chris, I think my issue is slightly different: I am trying to get label text to show on the same line as the input field and datePicker button. Ahh... I see. I misunderstood. plabel for=startDateStart date /labelinput type=text name=startDate class=datePickerField //p This afternoon my experimental attempt to route around the problem is to apply a float to the label element that surrounds the, you know, label. This is working in some cases, not so well in other layouts. Usually people just say apply a float to the label elementperiod!. ;) Can you give a URL for the not so well in other layouts? I'm one of those masochistic types who avoids using tables for layout -- even on forms. Instead I use the delightfully ambiguous definition list element (dl) and some strategic classes on the label elements (when needed). Otherwise I would just put the label and the text input in separate table cells. It's hard to argue against a self-aware masochist but I would suggest you repress your internal desire for self-inflicted pain and change your layout paradigm. :) Personally, I use tables for forms and put the label on top of the field. Regards, Chris.
[jQuery] Re: datePicker v2 beta
Is there any particular reason why your plugin doesn't have an option for specifying time as well as date? I'd like to use this plugin but need time functionality. On Apr 24, 7:54 pm, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'd like to announce the beta release of v2 of my datePicker plugin for jQuery. This release is a complete rewrite which makes the date picker considerably more powerful and flexible than it previously was. Check out the temporary project page: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/ Note, this is currently in beta and may be a little rough around the edges but I'd love to get some feedback. I've tested in FF2, IE6 and Opera 9 but it would be good to know if it works in other browsers (particulaly Safari). Plus any other feedback on extra stuff you'd like adding or bugs you discover, Cheers, Kelvin :)
[jQuery] Re: datePicker v2 beta
Hi Kelvin, The evolution is wondelful! It's a great and useful plugin. Thanks for your job! Xavier On Apr 24, 11:54 am, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'd like to announce the beta release of v2 of my datePicker plugin for jQuery. This release is a complete rewrite which makes the date picker considerably more powerful and flexible than it previously was. Check out the temporary project page: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/ Note, this is currently in beta and may be a little rough around the edges but I'd love to get some feedback. I've tested in FF2, IE6 and Opera 9 but it would be good to know if it works in other browsers (particulaly Safari). Plus any other feedback on extra stuff you'd like adding or bugs you discover, Cheers, Kelvin :)
[jQuery] Re: datePicker v2 beta
pd wrote: Is there any particular reason why your plugin doesn't have an option for specifying time as well as date? I'd like to use this plugin but need time functionality. Because I'd like to keep the plugin as light weight as possible (it's already bigger than it should ideally be) and personally I have never had the need for a time/date selector while I have needed a date selector many times... Sam Collett was working on a time picker a while back - maybe you can use the two plugins together? http://www.texotela.co.uk/code/jquery/timepicker/ Hope that helps, Kelvin :)
[jQuery] Re: datePicker v2: setStartDate() is not a function?
On Sunday, May 20, 2007 10:00 AM Kelvin Luck said: Since the date picker methods are added to all jQuery methods I thought it polite to prefix them to avoid naming collisions with other plugins. Ahh - I've just noticed that there was a typo in the documentation which is maybe why you got confused... I just fixed it ( http://dev.jquery.com/changeset/1930 ) and the documentation ( http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.htm l ) is now correct, Thanks Kelvin!
[jQuery] Re: datePicker v2: setStartDate() is not a function?
Chris W. Parker wrote: Hello, I'm trying to implement datePicker v2 but Firebug says $('#date').setStartDate is not a function. I must be missing something simple because I can click calendar and have the calendar appear. So it works, just not completely. Any ideas where I'm going wrong? ... // datePicker v2 stuff Date.firstDayOfWeek = 7; Date.format = 'mm/dd/yyy'; $(document).ready(function () { // Kelvin Luck's datePicker v2 $('#date').datePicker(); $('#date').setStartDate('01/01/2006'); }); Hi, It seems like you are looking for dpSetStartDate. In fact, to achieve what the code above does you can do this: $('#date').datePicker({startDate:'01/01/2006'}); If you need to changed the start date after the date picker has been initialised for any reason (like for example in my Start and end date pickers example) then you will need to use dpSetStartDate like so: $('#date').dpSetStartDate('01/01/2006'); Since the date picker methods are added to all jQuery methods I thought it polite to prefix them to avoid naming collisions with other plugins. Ahh - I've just noticed that there was a typo in the documentation which is maybe why you got confused... I just fixed it ( http://dev.jquery.com/changeset/1930 ) and the documentation ( http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.html ) is now correct, Thanks, Kelvin :)
[jQuery] Re: datePicker v2 beta
Kelvin, I thought packer only needed the final ; ... do you know the rules? is it as simple as making it work if you remove all linefeeds? On 5/20/07, Kelvin Luck [EMAIL PROTECTED] wrote: tlphipps wrote: Sorry, one more thing. I can't get a clean compressed/packed version of v2. Has anybody else had any luck packing this? Hi, I've just added some missing semicolons to the date picker sourcecode so that you can now pack it successfully with Dean Edwards' Packer, Cheers, Kelvin :) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: datePicker v2 beta
Hi Jake, I think it needs them in any situation where a linebreak is being used to indicate the end of an expression (as when the linebreaks are removed this implicit end of expression is lost). You can see the changes I had to make to get it to work with packer here: http://dev.jquery.com/changeset/1931 Cheers, Kelvin :) Ⓙⓐⓚⓔ wrote: Kelvin, I thought packer only needed the final ; ... do you know the rules? is it as simple as making it work if you remove all linefeeds? On 5/20/07, *Kelvin Luck * [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: tlphipps wrote: Sorry, one more thing. I can't get a clean compressed/packed version of v2. Has anybody else had any luck packing this? Hi, I've just added some missing semicolons to the date picker sourcecode so that you can now pack it successfully with Dean Edwards' Packer, Cheers, Kelvin :) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: datePicker v2 beta
thanks! I thought semis were just required when removing linebreaks wouldn't work... I searched the 'net for a definitive rule, I just found the regular work-arounds, (semis all over). I'm prepping some code to be packed. Do I have to cat it together with the jquery-lite first? can I pack a file on it's own? On 5/20/07, Kelvin Luck [EMAIL PROTECTED] wrote: Hi Jake, I think it needs them in any situation where a linebreak is being used to indicate the end of an expression (as when the linebreaks are removed this implicit end of expression is lost). You can see the changes I had to make to get it to work with packer here: http://dev.jquery.com/changeset/1931 Cheers, Kelvin :) Ⓙⓐⓚⓔ wrote: Kelvin, I thought packer only needed the final ; ... do you know the rules? is it as simple as making it work if you remove all linefeeds? On 5/20/07, *Kelvin Luck * [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: tlphipps wrote: Sorry, one more thing. I can't get a clean compressed/packed version of v2. Has anybody else had any luck packing this? Hi, I've just added some missing semicolons to the date picker sourcecode so that you can now pack it successfully with Dean Edwards' Packer, Cheers, Kelvin :) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: datePicker v2 beta
Hi, I've added support for this into the date picker: http://dev.jquery.com/changeset/1933#file2 As you can see, you can now pass a hoverClass to $().datePicker or $().renderCalendar which is added to each TD of the calendar as you hover over it. This defaults to dp-hover. You can also pass false if you don't want any class added to the TDs. Hope that helps, Kelvin :) tlphipps wrote: Another issue I've uncovered is related to the :hover effects. In your original date picker you were obviously using as because the hover effect worked correctly in IE. However, hovering doesn't work in v2 because of IE's quirkiness. Anybody have any input on how to get the :hover effect back in IE with v2?
[jQuery] Re: datePicker v2 beta
Another issue I've uncovered is related to the :hover effects. In your original date picker you were obviously using as because the hover effect worked correctly in IE. However, hovering doesn't work in v2 because of IE's quirkiness. Anybody have any input on how to get the :hover effect back in IE with v2? On May 8, 6:46 pm, Will [EMAIL PROTECTED] wrote: Overall, I think the new date picker and jquery are really awesome! I do have one comment though. I find the date parsing logic a little too strict. If I use format mm/dd/ and I type in 5/1/2007, it's not going to parse correctly (code in date.js:440). This causes the calendar to not refresh correctly and it's somewhat confusing to the user. Is there any way to get around that? Will On Apr 24, 4:54 am, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'd like to announce the beta release ofv2of mydatePickerplugin for jQuery. This release is a complete rewrite which makes the date picker considerably more powerful and flexible than it previously was. Check out the temporary project page: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/ Note, this is currently in beta and may be a little rough around the edges but I'd love to get some feedback. I've tested in FF2, IE6 and Opera 9 but it would be good to know if it works in other browsers (particulaly Safari). Plus any other feedback on extra stuff you'd like adding or bugs you discover, Cheers, Kelvin :)
[jQuery] Re: datePicker v2 beta
Sorry, one more thing. I can't get a clean compressed/packed version of v2. Has anybody else had any luck packing this? On May 8, 6:46 pm, Will [EMAIL PROTECTED] wrote: Overall, I think the new date picker and jquery are really awesome! I do have one comment though. I find the date parsing logic a little too strict. If I use format mm/dd/ and I type in 5/1/2007, it's not going to parse correctly (code in date.js:440). This causes the calendar to not refresh correctly and it's somewhat confusing to the user. Is there any way to get around that? Will On Apr 24, 4:54 am, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'd like to announce the beta release ofv2of mydatePickerplugin for jQuery. This release is a complete rewrite which makes the date picker considerably more powerful and flexible than it previously was. Check out the temporary project page: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/ Note, this is currently in beta and may be a little rough around the edges but I'd love to get some feedback. I've tested in FF2, IE6 and Opera 9 but it would be good to know if it works in other browsers (particulaly Safari). Plus any other feedback on extra stuff you'd like adding or bugs you discover, Cheers, Kelvin :)
[jQuery] Re: datePicker v2 beta
Thanks Karl. I've come up with code that will do what I need based on your link, but I can't figure out where it needs to be placed in the datepicker code in order to fire at the correct time (when the calendar pops up). On May 18, 12:38 pm, Karl Swedberg [EMAIL PROTECTED] wrote: On May 18, 2007, at 1:09 PM, tlphipps wrote: Anybody have any input on how to get the :hover effect back in IE with v2? Not sure about the datePicker v2 in particular, but this blog entry discusses the the topic in more general terms: http://www.learningjquery.com/2007/02/quick-tip-set-hover-class-for- anything --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com
[jQuery] Re: datePicker v2 beta
On May 18, 2007, at 1:09 PM, tlphipps wrote: Anybody have any input on how to get the :hover effect back in IE with v2? Not sure about the datePicker v2 in particular, but this blog entry discusses the the topic in more general terms: http://www.learningjquery.com/2007/02/quick-tip-set-hover-class-for- anything --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: datePicker v2: setStartDate() is not a function?
Even pass in parameters is right =/ i´m with same problem for that i still have the old version lol On 5/18/07, Chris W. Parker [EMAIL PROTECTED] wrote: Hello, I'm trying to implement datePicker v2 but Firebug says $('#date').setStartDate is not a function. I must be missing something simple because I can click calendar and have the calendar appear. So it works, just not completely. Any ideas where I'm going wrong? Relevant code is at the end. Thanks! Chris. HTML: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titledatePicker test/title link rel=stylesheet type=text/css href=lib/css/jquery.datePicker-v2.css/ script type=text/javascript src=lib/js/jquery-1.1.2.compressed.js/script script type=text/javascript src=lib/js/datePicker-v2/date.js/script script type=text/javascript src=lib/js/datePicker-v2/dimensions.js/script script type=text/javascript src=lib/js/datePicker-v2/jquery.datePicker-v2.js/script script type=text/javascript src=lib/js/custom2.js/script /head body p id=datecalendar/p /body /html custom.js: // datePicker v2 stuff Date.firstDayOfWeek = 7; Date.format = 'mm/dd/yyy'; $(document).ready(function () { // Kelvin Luck's datePicker v2 $('#date').datePicker(); $('#date').setStartDate('01/01/2006'); }); -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com
[jQuery] Re: datePicker v2 beta
Overall, I think the new date picker and jquery are really awesome! I do have one comment though. I find the date parsing logic a little too strict. If I use format mm/dd/ and I type in 5/1/2007, it's not going to parse correctly (code in date.js:440). This causes the calendar to not refresh correctly and it's somewhat confusing to the user. Is there any way to get around that? Will On Apr 24, 4:54 am, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'd like to announce the beta release of v2 of mydatePickerplugin for jQuery. This release is a complete rewrite which makes the date picker considerably more powerful and flexible than it previously was. Check out the temporary project page: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/ Note, this is currently in beta and may be a little rough around the edges but I'd love to get some feedback. I've tested in FF2, IE6 and Opera 9 but it would be good to know if it works in other browsers (particulaly Safari). Plus any other feedback on extra stuff you'd like adding or bugs you discover, Cheers, Kelvin :)
[jQuery] Re: datePicker v2 beta
On Apr 30, 2:34 pm, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, On Mon, April 30, 2007 12:25 pm, Sam Collett wrote: Several features in that picker that look like they would be handy in Kelvin's that aren't in yet are: Keyboard Navigation I've been thinking about this... It's not a priority for me currently because I'm not sure that it would be worth the extra filesize on the plugin for the amount of people who would use it. It is on a TODO list as something to possibly implement as an optional extension if/ when I have time... Don't show the days in other months (you can use CSS to hide them, but they would still be clickable) You can also use CSS to render them non-clickable. Just give them a style of disabled in the custom cell renderer... I'll set up an example of this before the actual release of the plugin... Disable certain days of the week (e.g. Saturday and Sunday) Did you see the custom cell renderer demo?http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerCust... Transparency (could probably be done with CSS) Yeah - I think this should be done in the CSS. Thanks for the feedback, Kelvin :) A couple more suggestions: - abbreviated month names (Jan, Feb etc) - longer day names (Mon, Monday, Tue, Tuesday etc) And something that would be nice, but may be a bit of work (and perhaps better suited as an extension): - have the year at the top and all the months below it, like how Google Analytics does it (http://www.texotela.co.uk/gacal.jpg) - as a result, you could perhaps select all the days in the month, or select a whole week I appreciate all the work you are putting into this (as I am sure others are too). It is plugins like this that help to get people into jQuery.