[jQuery] Re: Known issues with webkit and jQuery 1.3?

2009-05-01 Thread Kelvin Luck

Hi Dan,

Thanks for the response. I think you are correct that it has something
to do with the loading of the CSS. Some people reported the problem
was fixed by re-arranging the order of the CSS and JS includes in the
head of the document. I also just saw this post to the jquery-dev list
which looks like it may be worth checking out in more detail:

http://groups.google.com/group/jquery-dev/browse_thread/thread/77be7025a17eed3b

I'll report back here if I figure anything out,

Cheers,

Kelvin :)

On Fri, May 1, 2009 at 7:29 AM, Dan G. Switzer, II
dswit...@pengoworks.com wrote:
 Kelvin,
 While I didn't really dig into the problem, looking at the inspecting
 the jScrollPaneContainer element in Chrome, the width is being set to 1130px
 for me.
 My guess is something in your code is calculating the wrong width for the
 element.
 My best guess is this is due with the issue in Webkit where if you don't
 load *all* the CSS before the JS, then the ready() function fires before all
 the CSS is applied, therefore your dimensions can be off.
 You might try moving the scrollpane code in a $(window).load() event
 temporarily to see if that changes things.
 -Dan
 On Tue, Apr 28, 2009 at 1:13 PM, Kelvin Luck kelvin.l...@gmail.com wrote:

 Hi again,

 I have now reproduced the issue in Safari on PC and now Chrome on PC.
 One of the user's reported a problem with this site:

 http://warehousetwentyone.com/

 Clicking back and forth between warehouse and services in the
 aforementioned browsers sometimes breaks. A refresh fixes it. And it
 never breaks on the initial load. So it appears to be a webkit issue
 but I'm not sure exactly where it is going wrong...

 Any ideas still much appreciated,

 Kelvin :)

 On Tue, Apr 28, 2009 at 9:53 AM, Kelvin Luck kelvin.l...@gmail.com
 wrote:
  Hi,
 
  Sorry for the vague question but I'm wondering if there are any known
  issues with webkit browsers (e.g. Safari and Chrome) and jQuery 1.3?
 
  I've had quite a few queries from users of my jScrollPane plugin who
  have noticed issues with it on Safari on mac. They seem to be
  related to either document.ready firing at the wrong time or possibly
  to calculations of height going wrong.
 
  You can see some of the reports here:
 
  http://code.google.com/p/jscrollpane/issues/detail?id=60
 
  It also seems to be related to the state of the user's cache. One user
  said: Scrollbar works correctly on first load, but breaks when one or
  more of the dependent files loads from the browser cache, specifically
  in Safari on Mac. while another said: Loads frequently with no
  scrollbars at all, on refresh is fine.. This is what makes me wonder
  if the problem is related to document.ready...
 
  It seems like some people solved the problem by adjusting the order of
  the script and css files in the head of the document but this didn't
  work for everyone.
 
  I first started getting reports like this around the time jQuery 1.3
  came out and I don't think there were any previous to that. So it may
  be related to 1.3. But it could also be related to some changes I did
  at that time... I am asking my users to help me debug but I wondered
  if there was any known issues that might be causing this...
 
  Thanks for any ideas or pointers,
 
  Kelvin :)
 




[jQuery] Known issues with webkit and jQuery 1.3?

2009-04-28 Thread Kelvin Luck

Hi,

Sorry for the vague question but I'm wondering if there are any known
issues with webkit browsers (e.g. Safari and Chrome) and jQuery 1.3?

I've had quite a few queries from users of my jScrollPane plugin who
have noticed issues with it on Safari on mac. They seem to be
related to either document.ready firing at the wrong time or possibly
to calculations of height going wrong.

You can see some of the reports here:

http://code.google.com/p/jscrollpane/issues/detail?id=60

It also seems to be related to the state of the user's cache. One user
said: Scrollbar works correctly on first load, but breaks when one or
more of the dependent files loads from the browser cache, specifically
in Safari on Mac. while another said: Loads frequently with no
scrollbars at all, on refresh is fine.. This is what makes me wonder
if the problem is related to document.ready...

It seems like some people solved the problem by adjusting the order of
the script and css files in the head of the document but this didn't
work for everyone.

I first started getting reports like this around the time jQuery 1.3
came out and I don't think there were any previous to that. So it may
be related to 1.3. But it could also be related to some changes I did
at that time... I am asking my users to help me debug but I wondered
if there was any known issues that might be causing this...

Thanks for any ideas or pointers,

Kelvin :)


[jQuery] Re: Known issues with webkit and jQuery 1.3?

2009-04-28 Thread Kelvin Luck

Hi again,

I have now reproduced the issue in Safari on PC and now Chrome on PC.
One of the user's reported a problem with this site:

http://warehousetwentyone.com/

Clicking back and forth between warehouse and services in the
aforementioned browsers sometimes breaks. A refresh fixes it. And it
never breaks on the initial load. So it appears to be a webkit issue
but I'm not sure exactly where it is going wrong...

Any ideas still much appreciated,

Kelvin :)

On Tue, Apr 28, 2009 at 9:53 AM, Kelvin Luck kelvin.l...@gmail.com wrote:
 Hi,

 Sorry for the vague question but I'm wondering if there are any known
 issues with webkit browsers (e.g. Safari and Chrome) and jQuery 1.3?

 I've had quite a few queries from users of my jScrollPane plugin who
 have noticed issues with it on Safari on mac. They seem to be
 related to either document.ready firing at the wrong time or possibly
 to calculations of height going wrong.

 You can see some of the reports here:

 http://code.google.com/p/jscrollpane/issues/detail?id=60

 It also seems to be related to the state of the user's cache. One user
 said: Scrollbar works correctly on first load, but breaks when one or
 more of the dependent files loads from the browser cache, specifically
 in Safari on Mac. while another said: Loads frequently with no
 scrollbars at all, on refresh is fine.. This is what makes me wonder
 if the problem is related to document.ready...

 It seems like some people solved the problem by adjusting the order of
 the script and css files in the head of the document but this didn't
 work for everyone.

 I first started getting reports like this around the time jQuery 1.3
 came out and I don't think there were any previous to that. So it may
 be related to 1.3. But it could also be related to some changes I did
 at that time... I am asking my users to help me debug but I wondered
 if there was any known issues that might be causing this...

 Thanks for any ideas or pointers,

 Kelvin :)



[jQuery] Pointless but fun jQuery experiment

2009-03-25 Thread Kelvin Luck

Inspired by google's chrome experiments I recently put together a
pointless but fun experiment with the help of jQuery and I thought
that people on the list might like to check it out:

http://www.kelvinluck.com/assets/jquery/boingPic/index.html

As I said, completely pointless but makes a nice change from serious
progressive enhancement!

Hope you like it,

Kelvin :)


[jQuery] Re: [validate] Hooks for animating the appearance and disappearance of the error messages

2009-02-18 Thread Kelvin Luck

Hi Jörn,

Thanks for the reply :)

I know using the errorPlacement is a bad workaround but I couldn't
figure out another way to do it.

Basically what I would like is for each error to slideDown when it is
shown and to slideUp when it is hidden. When I looked through the
code, it seemed like highlight and unhighlight were passed a reference
to the actual field which was invalid (rather than it's associated
error message) so I wasn't sure I could use those...

My idea was that rather than calling hide() and show() on the error
messages directly you could instead have settings which would by
default point to those functions but which the user could override.
Does that make sense?

Cheers,

Kelvin :)

On Wed, Feb 18, 2009 at 12:30 AM, Jörn Zaefferer
joern.zaeffe...@googlemail.com wrote:

 Hi Kelvin,

 using errorPlacement is a really bad workaround, as its called only
 once per error. After using errorPlacement to add the error-label to
 the DOM, it isn't called again.

 A better workaround would use the highlight and unhighlight options.

 Could you provide a simple demo that shows the behaviour you'd like to
 achieve? Just some jQuery code that animates some label, with the
 necessary markup and CSS. That would be a good starting point for me
 to work on a solution.

 Jörn

 On Tue, Feb 17, 2009 at 11:32 PM, Kelvin Luck kelvin.l...@gmail.com wrote:

 Hi,

 I've just used the validate plugin for the first time and it works
 great :) One extra thing I would love to see is some sort of hooks
 which allow the user to customise how the error messages appear and
 disappear. I managed to hack it in for appearing messages using the
 errorPlacement function but I couldn't find a way to animate the
 disappearing error messages.

 More information, an example and some code here:

 http://www.kelvinluck.com/2009/02/progressive-enhancement-with-jquery-example/

 Would this be something you would consider adding into the plugin?

 Thanks,

 Kelvin :)

 p.s. sorry if this has already been discussed - I haven't been able to
 keep up with the volume on this list for a looong time!
 p.p.s. sorry if this comes through twice - I sent it from the wrong
 email address first time...




[jQuery] Re: [validate] Hooks for animating the appearance and disappearance of the error messages

2009-02-18 Thread Kelvin Luck

Hi,

Does this help?

http://www.kelvinluck.com/assets/jquery/validate/validate.html

It's a simplified version of the original demo (
http://www.shair.it/sandbox ) - but it is still using errorPlacement
to slideDown the error messages first time they appear,

Here is another version which (I think) would work with my imagined enhancement:

http://www.kelvinluck.com/assets/jquery/validate/validate2.html

Let me know if you need something different,

Cheers,

Kelvin :)

On Wed, Feb 18, 2009 at 12:58 AM, Jörn Zaefferer
joern.zaeffe...@googlemail.com wrote:

 Yes, it does. And for implementing, it would help a lot to have a
 simple demo that has the right layout for the animations to work.

 Jörn

 On Wed, Feb 18, 2009 at 9:40 AM, Kelvin Luck kelvin.l...@gmail.com wrote:

 Hi Jörn,

 Thanks for the reply :)

 I know using the errorPlacement is a bad workaround but I couldn't
 figure out another way to do it.

 Basically what I would like is for each error to slideDown when it is
 shown and to slideUp when it is hidden. When I looked through the
 code, it seemed like highlight and unhighlight were passed a reference
 to the actual field which was invalid (rather than it's associated
 error message) so I wasn't sure I could use those...

 My idea was that rather than calling hide() and show() on the error
 messages directly you could instead have settings which would by
 default point to those functions but which the user could override.
 Does that make sense?

 Cheers,

 Kelvin :)

 On Wed, Feb 18, 2009 at 12:30 AM, Jörn Zaefferer
 joern.zaeffe...@googlemail.com wrote:

 Hi Kelvin,

 using errorPlacement is a really bad workaround, as its called only
 once per error. After using errorPlacement to add the error-label to
 the DOM, it isn't called again.

 A better workaround would use the highlight and unhighlight options.

 Could you provide a simple demo that shows the behaviour you'd like to
 achieve? Just some jQuery code that animates some label, with the
 necessary markup and CSS. That would be a good starting point for me
 to work on a solution.

 Jörn

 On Tue, Feb 17, 2009 at 11:32 PM, Kelvin Luck kelvin.l...@gmail.com wrote:

 Hi,

 I've just used the validate plugin for the first time and it works
 great :) One extra thing I would love to see is some sort of hooks
 which allow the user to customise how the error messages appear and
 disappear. I managed to hack it in for appearing messages using the
 errorPlacement function but I couldn't find a way to animate the
 disappearing error messages.

 More information, an example and some code here:

 http://www.kelvinluck.com/2009/02/progressive-enhancement-with-jquery-example/

 Would this be something you would consider adding into the plugin?

 Thanks,

 Kelvin :)

 p.s. sorry if this has already been discussed - I haven't been able to
 keep up with the volume on this list for a looong time!
 p.p.s. sorry if this comes through twice - I sent it from the wrong
 email address first time...






[jQuery] [validate] Hooks for animating the appearance and disappearance of the error messages

2009-02-17 Thread Kelvin Luck

Hi,

I've just used the validate plugin for the first time and it works
great :) One extra thing I would love to see is some sort of hooks
which allow the user to customise how the error messages appear and
disappear. I managed to hack it in for appearing messages using the
errorPlacement function but I couldn't find a way to animate the
disappearing error messages.

More information, an example and some code here:

http://www.kelvinluck.com/2009/02/progressive-enhancement-with-jquery-example/

Would this be something you would consider adding into the plugin?

Thanks,

Kelvin :)

p.s. sorry if this has already been discussed - I haven't been able to
keep up with the volume on this list for a looong time!
p.p.s. sorry if this comes through twice - I sent it from the wrong
email address first time...


[jQuery] Re: jScrollPane and display:none

2008-06-16 Thread Kelvin Luck


I'm not sure what could be happening - do you have a test URL?

A possible workaround might be to not initialise the jScrollPane until 
you show the layer. Then the code which shows the hidden layer could 
immediately initialise the jScrollPane once it's shown it...


Cheers,

Kelvin :)

yabado wrote:

To elaborate, when I say it does not work, I mean it stays hidden,
but the rest of the parent layers shows and hides as expected.




On Jun 16, 10:27 am, yabado [EMAIL PROTECTED] wrote:

I have a page that shows and hides a layer based on a click.

When the page loads, this layer is set to css ; display:none

I have a scrollpane inside of this layer.

When I click and show the hidden layer, everything works except the
scrollpane?

If I remove the display attribute and reload the page, then the
scrollpane is there and works fine.

It has something to do with the parent layer being hidden I and I
cannot figure it out.

Any ideas?

Using FF and Safari


[jQuery] Re: datepicker select to update a div, and strange datepicker css issue

2008-05-28 Thread Kelvin Luck


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: jScrollPane: hide an arrow at end of content?

2008-01-31 Thread Kelvin Luck


Hi,

It seems like a sensible requirement to be able to style inactive arrows 
differently to active ones and to be honest I thought that I had code to 
do this in jScrollPane. From a quick look it seems like I haven't though...


So I have raised a ticket for myself to implement this:
http://plugins.jquery.com/node/1424

I will try and get this done ASAP (there are a few tickets for 
jScrollPane which all need dealing with). In the meantime you can try 
creating and styling a disabled class and assume that the next version 
of the plugin will dynamically add and remove it.


Hope that helps,

Kelvin :)


DingoNV wrote:

i was wondering if anyone has a quick and easy way to hide an arrow if
you are at the beginning or end of the scrollable content.

for instance
i would want the top arrow to not be visible at first, because there
is no content above it.

and when i reach the end of the content, i would like the down arrow
to disappear.

I know enough to just set the position of the arrow object to some
place so that it's not visible, but i don't know enough jQuery or how
jScrollPane works to figure out how too do this.

Is there an event that is triggered by jScrollPane when scrolling
stops that reports the position?

thanks for any help.


[jQuery] Re: Date picker

2008-01-14 Thread Kelvin Luck


I can confirm it's not working for me either on IE7 on that page...

You could try my date picker instead:

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html

Cheers,

Kelvin :)

Lionel Martelly wrote:

Does anyone have any issue with date picker not working in IE7.0?

$('#period').datepicker({dateFormat: 'MM d, yy', rangeSelect: true, 
firstDay: 1});


http://docs.jquery.com/UI/Datepicker

Looks like we have same issue on that page 





[jQuery] Re: ui.datepicker documentation inconsistencies

2008-01-01 Thread Kelvin Luck


Hi,

Your confusion is due to the fact that there are two date picker 
plugins. Mine and Marc's. Marc's plugin was previously called jQuery 
calendar but was renamed to date picker at some point and included in 
the jQuery UI library.


I hope that clears thing up,

Kelvin :)

Shawn wrote:

I'm sure this is old news, but

Getting details for the Datepicker plugin isn't very smooth.  Going 
through http://plugins.jquery.com, and bringing up the plugin page and 
then clicking the Home Page link.  This takes you to Kelvin Luck's URL 
(http://kelvinluck.com/assets/jquery/datePicker/).  However this seems 
to be out of date, as the Marc Grabanski 
(http://marcgrabanski.com/code/ui-datepicker/) URL shows version 3.2 
(not v2 as indicated by Kelvin's page).


Clicking the documentation link (from the main plugin page), takes you 
again to Kelvin's domain 
(http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.html) 
whereas the official documentation seems to be at 
http://docs.jquery.com/UI/Datepicker.


Finally, the try out a demonstration link (again from the main plugin 
page) takes you once again to Kelvin's domain and appears to be out of 
date (http://kelvinluck.com/assets/jquery/datePicker/v2/demo/).  Whereas 
the link from the jQuery documentation page 
(http://docs.jquery.com/UI/Datepicker) for Demos and Examples takes 
you to Marc's domain (http://marcgrabanski.com/code/ui-datepicker/).


I was just typing up a quick HowTo 
(http://jquery.open2space.com/node/59) and noticed the discrepancies. 
For someone *just* starting out, this can be confusing simply because it 
makes it a little tougher to find the *right* documentation.  Anything 
we can do about this??


(Sorry Kelvin - not meaning to bash you at all - it took a lot of effort 
to get those pages in place, but Marc's pages seem to be more up to date...)


My observations... :)

Shawn


[jQuery] Re: adding conditional to $(x)

2007-12-31 Thread Kelvin Luck


Hi,

You could try this (untested):

$('[EMAIL PROTECTED]').each(
function()
{
$this = $(this);
if ($this.val()  5) {
$this.addClass('S');
} else if ($this.val()  10) {
$this.addClass('L');
} else {
$this.addClass('M');
}
}
);

Hope that helps,

Kelvin :)

Dug Falby wrote:

Hi all,

I'd like to do the following:

walk through the DOM stopping at:

[EMAIL PROTECTED]

and conditionally add a class to each input tag:

if [EMAIL PROTECTED]()  5 then .addClass('S')
if [EMAIL PROTECTED]()  10 then .addClass('L')
else .addClass('M')

Can I still use the lovely $() construct?

Thanks:-)
Dug



[jQuery] Re: adding conditional to $(x)

2007-12-31 Thread Kelvin Luck


Hi,

Your demo page gives me an error in the firebug console: missing ) 
after argument list. After a closer look I realised that's because you 
aren't wrapping the stuff you are passing into the ready call in a 
function block...


Also, $this.val() will return the actual value of the input so if you 
want the length you will need to use the .length property.


Here is a working version of the script:

$(document).ready(
function() {
$('[EMAIL PROTECTED]').each(
function() {
$this = $(this);
var len = $this.val().length;
if (len  5) {
$this.addClass('S');
} else if (len  10) {
$this.addClass('L');
} else {
$this.addClass('M');
}
}
);
}
);

If you don't already have it, I recommend you get firebug which would 
help you to debug issues like this,


Hope that helps,

Kelvin :)

dug wrote:

Hi Kelvin,

This looks really good.

It's not working but this may be down to something really stupid on my
part. I've put your code into an example to give an idea of what I'm
trying to do:

http://donkeyontheedge.com/jqtest/ (I'm looking at this in Firefox)

Could it be that $this.val() doesn't return an integer that
corrresponds to the number of letters in the value attribute? Should
it be val().length() or something?

Thanks for your help!

Cheers,
Dug


On Dec 31, 12:06 pm, Kelvin Luck [EMAIL PROTECTED] wrote:

Hi,

You could try this (untested):

$('[EMAIL PROTECTED]').each(
function()
{
$this = $(this);
if ($this.val()  5) {
$this.addClass('S');
} else if ($this.val()  10) {
$this.addClass('L');
} else {
$this.addClass('M');
}
}
);

Hope that helps,

Kelvin :)

Dug Falby wrote:

Hi all,
I'd like to do the following:
walk through the DOM stopping at:
[EMAIL PROTECTED]
and conditionally add a class to each input tag:
if [EMAIL PROTECTED]()  5 then .addClass('S')
if [EMAIL PROTECTED]()  10 then .addClass('L')
else .addClass('M')
Can I still use the lovely $() construct?
Thanks:-)
Dug


[jQuery] Re: server side jquery

2007-12-16 Thread Kelvin Luck


Sharique wrote:

Is it possible to run excute jquery on server side.


http://ejohn.org/blog/bringing-the-browser-to-the-server/


[jQuery] Re: Universal Programming Language concept...

2007-11-08 Thread Kelvin Luck


It's a bit off topic but you might want to check out haXe:

http://haxe.org/

It's a OO language which can compile down to swf, javascript and neko 
which can run as a serverside process...


phobis wrote:

We will attempt to make this the Esperanto of the programming world
(from a language perspective).  Ultimately we want it to translate
to other technologies and languages. In the future other projects will
merge with this one. Our plan is to make a UI engine and framework off
of the language. We already have a lot of code written in .NET and PHP
(as concepts) to do transformations of XML to both MXML (Flex) and
XAML (Silverlight/WPF). We think we will be able to produce something
to be universal... in hopes to give programmers a break in the ever-
changing world. The more help we get, the better. Our first goal is
simple. We need to come up with a GREAT language that people fall in
love with immediately. Something powerful, simple and intuitive.

Please let us know what you think.



[jQuery] Re: jScrollPane refuses to display arrows in IE/Win

2007-11-08 Thread Kelvin Luck


Hi,

Sorry - I think that there was a problem with the compressed version of 
the jScrollPane script. I've just re-uploaded it and (I think) fixed the 
problem.


Can you grab the new file from here:

http://kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.min.js

And let me know if it fixes the problem?

Thanks,

Kelvin :)

Joe C wrote:

It's really hard when my friend jQuery doesn't Just Work.

I'm building a site and attempting to use jScrollPane.  Here's a
sample URL:

http://pl281.pairlitesite.com/events

I'm using jQuery 1.2.1 along with jScrollPane (with dimensions and
mousewheel) and superfish.  Everything is just great in Firefox and
Safari, but IE 6 and 7 will not display the arrows on the scroll
bars.  I checked things out in IE's DOM Inspector, and those elements
are not being included.  There's space for them on the page visually,
but they're not in the DOM.  No errors are being reported, it's just
not happening.

Am I missing something?  I've tried removing superfish, I've tried
using different jquery selectors to target the div that should scroll,
but nothing seems to help.  This is driving me just slightly nuts.
It's probably my fault somehow, but I can't sort it out.

Any help is greatly appreciated.



[jQuery] Re: Moo based Calendar widget

2007-11-06 Thread Kelvin Luck



It looks like it also has a number of handy additions to the Date
object that might be useful outside of mootools:

http://moomonth.com/docs/index.html



There some additions to the Date object like this for jQuery by Joern 
Zaefferer and Brandon Aaron here:


http://jqueryjs.googlecode.com/svn/trunk/plugins/methods/date.js

If someone wants to build something like the mootools calendar they may 
want to use my renderCalendar function to do the boring bit of creating 
the calendar:


http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.html

Cheers,

Kelvin :)


[jQuery] Re: Getting the now focused element in a blur event handler

2007-10-31 Thread Kelvin Luck


Hi,

Just bumping the below question in case there is anyone who didn't see 
it previously who has some idea how to find the element on a page which 
is currently focused?


Thanks,

Kelvin :)

Kelvin Luck wrote:


Hi,

I'm looking for a way to find out the currently focused element from 
within a blur event. I have it working in Firefox using 
event.explicitOriginalTarget as you can see here:


http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerOnFocus.html 



However, this seems to be a Firefox only property on the event so is no 
good to me for IE or Safari :(


As you can see, what I am trying to do is on blur of the input check if 
the now focused element is in the popped up calendar or not. If it is in 
the calendar then leave the calendar there, otherwise remove it.


Is there a way to do this?

Thanks in advance,

Kelvin :)


[jQuery] Getting the now focused element in a blur event handler

2007-10-29 Thread Kelvin Luck


Hi,

I'm looking for a way to find out the currently focused element from 
within a blur event. I have it working in Firefox using 
event.explicitOriginalTarget as you can see here:


http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerOnFocus.html

However, this seems to be a Firefox only property on the event so is no 
good to me for IE or Safari :(


As you can see, what I am trying to do is on blur of the input check if 
the now focused element is in the popped up calendar or not. If it is in 
the calendar then leave the calendar there, otherwise remove it.


Is there a way to do this?

Thanks in advance,

Kelvin :)


[jQuery] Re: Datepicker bug in latest Opera

2007-10-25 Thread Kelvin Luck


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: Jscrollpane and Jquery UI when combined gives error.

2007-10-12 Thread Kelvin Luck


Hi,

jScrollPane is currently tested against jQuery 1.2.1 and it works fine. 
I just noticed there was some misleading information on the jScrollPane 
homepage which I've now updated to make it clear it uses 1.2.1...


Do you have an example URL where it is failing? If you can provide that 
I might be able to help you debug,


Cheers,

Kelvin :)

subra wrote:

When i combine JScrollPane and Jquery UI tabs , i have a exception
thrown saying Exception thrown but not caught.

   when i see the Problem i found the JQuery versions are different UI
Tabs is using 1.2.1 , but JscrollPane is using 1.1.3.1
(incompatibility) . Does Jscrollpane coming out with the newer version
using Jquery 1.2.1 , or does any one how to solve this problem.


 Thanks in Advance.



[jQuery] Re: JQuery Cycle Plugin

2007-10-12 Thread Kelvin Luck


have a look at the bottom of this page:

http://malsup.com/jquery/cycle/int2.html

Andy Matthews wrote:

Just out of curiosity, does this plugin do text to, or just images?

Could it be wired up to do a div instead of an image?


andy 


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of MikeR
Sent: Thursday, October 11, 2007 10:17 PM
To: jQuery (English)
Subject: [jQuery] JQuery Cycle Plugin


Ran across this while digging through jQuery plugins...

http://malsup.com/jquery/cycle/begin.html

I just wanted to take a moment to say that is some excellent documentation!
I wish more plugins were documented like this (tutorial format)!

Oh hey.. and the plugin is quite nice too :).




[jQuery] Re: Keeping the calendar plug in open?

2007-10-07 Thread Kelvin Luck


Hi Iain,

I'm not sure which calendar plugin you are talking about but your email 
prompted me to add the functionality you describe to my datePicker 
plugin (something I've been meaning to do for a very long time and 
luckily had a spare bit of time today for).


You can find the examples of this new functionality here:

http://kelvinluck.com/assets/jquery/datePicker/v2/demo/inlineDatePicker.html
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/inlineDatePickerComplex.html

And you will find documentation, downloads and many examples of the 
plugin's homepage:


http://kelvinluck.com/assets/jquery/datePicker/v2/demo/

Hope that helps,

Kelvin :)

p.s. for people already using the datePicker and wanting to upgrade be 
warned that a little of the CSS has changed. So please re-download the 
CSS file.


iain duncan wrote:

Apologies if I'm posting in the wrong place, I'm new to jquery.

I've got the calendar plugin working ok, but would I would like it to do
is to stay open all the time ( as in google calendar ). I don't see in
the calendar docs any options or methods for preventing it from closing.
Am I missing something obvious or do I need to go hack the calendar
script itself? Or is there a better option for that kind of date picker?

Also, if someone knows how to get rid of the clear and close button too,
that would be great!

Thanks
Iain




[jQuery] Re: jScrollpane - Occasionaly runs in IE? (init/load problem)

2007-10-04 Thread Kelvin Luck


Hi,

Glad you like jScrollPane. I can only take a very quick look at this at 
the moment but I'm wondering if it's something to do with this bit of 
your JS:


window.onload = function(){
$(tr:nth-child(even)).addClass(even);
};

I think I remember having issues where using this old school syntax 
for assigning onload handlers caused jQuery to bomb in IE. Try replacing 
it with:


$(function() {
$(tr:nth-child(even)).addClass(even);
});

Or even move the striping code up into the ready block you already have...

Hope that helps,

Kelvin :)

Brett wrote:

Hey all, LOVING jScrollpane at the moment, here is a page I'm working
on.

http://cressaid.brettjamesonline.com/bvci/plastek/products1.html

The right area with the grey box is a scrollpane which will have a
bunch of different things in it. If you view it in firefox, you'll see
that the grey scroll bar comes up, works great :)

However, on Internet explorer 6, the jScrollpane does not load... I
get an error about an exception being not handled.
But, the really, really hard to diagnose part? if I reload the page,
or occasionaly when I view it, the page will load, jScrollbars
functioning!

Ther are other scrollers under neath too, which I was using to get it
at least appear with a default scrollbar. That works, Now I was just
wondering what kind of problem would cause this. Is there some kind of
loading order I should respect or do differently?

The javascript code itself at the moment is nothing special - its just
an adapted example code:
http://cressaid.brettjamesonline.com/bvci/css/scrollpane/scrollpanesets.js



[jQuery] Re: Question about jScrollPane - full body scroll

2007-10-04 Thread Kelvin Luck

Hi,

This line:

$('body.jScrollPaneContainer').css({'height': $w.height() + 'px', 
'width': $w.width() + 'px'});

translates to:

Set the height and width of the element with a class of 
jScrollPaneContainer directly inside the body (e.g. not nested any 
deeper) to the height and width of the window.

The body bit makes sure that any other scrollPane's on your page 
which are nested deeper don't also get their height and width changed.

Hope that helps,

Kelvin :)

simplybrianp wrote:
 In looking at the code for the full body scroll. I can not seem to
 understand one part of it. I am actually doing a couple of scroll
 panes in a page, that resize based on the window size, and am using
 the full body scroll as an example. I can not figure out what is going
 on in the line with the *** in front of it. Does anyone know what this
 is doing? Or how I would us it on a named div?
 
 $(function()
   {
   // this initialises the demo scollpanes on the 
 page.
   $('#pane3').jScrollPane();
   $('#pane1, #pane2').jScrollPane();
 
   var isResizing;
 
   // and the body scrollpane
   var setContainerHeight = function()
   {
   // IE triggers the onResize event 
 internally when you do the
 stuff in this function
   // so make sure we don't enter an 
 infinite loop and crash the
 browser
   if (!isResizing) {
   isResizing = true;
   $w = $(window);
   $c = $('#container');
   var p = 
 (parseInt($c.css('paddingLeft')) || 0) +
 (parseInt($c.css('paddingRight')) || 0);
   
 ***$('body.jScrollPaneContainer').css({'height': $w.height() +
 'px', 'width': $w.width() + 'px'});
   $c.css({'height': 
 ($w.height()-p) + 'px', 'width': ($w.width() -
 p) + 'px', 'overflow':'auto'});
   $c.jScrollPane();
   isResizing = false;
   }
   }
   $(window).bind('resize', setContainerHeight);
   setContainerHeight();
 
   // it seems like you need to call this twice to 
 get consistantly
 correct results cross browser...
   setContainerHeight();
 
   });
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: jscrollpane plugin problem

2007-10-04 Thread Kelvin Luck


It shouldn't be too slow to call jScrollPane on your div after everytime 
you add content to it. Is this what you tried?


I just did a quick bit of playing around with making the scroll pane 
automatically update itself and got it working in Firefox thanks to the 
DOMNodeInserted event but couldn't find an alternative in IE. I have an 
idea for a workaround but no time to work on it until the weekend...


Cheers,

Kelvin :)

Guillermo Movia wrote:

Hi, thanks for your answer. We tried this, but when a lot of news are
too slow.  We wish to know if maybe there's another solution.

Guillermo

2007/10/3, Alexandre Plennevaux [EMAIL PROTECTED]:

AFAIK you have to recall the function, or you can use the jquery live plugin


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Guillermo Movia
Sent: mercredi 3 octobre 2007 19:46
To: jquery-en@googlegroups.com
Subject: [jQuery] jscrollpane plugin problem


Hi, Kevin. We are using your plugin for a ul with news. Each new show by
default the title and an abstract with a button to display the invisible
part. This ul has a scroll pane. But, when the invisible part of one new is
show and then the ul increase it height, the scroll pane doesn't change it
height, and the new text overflow the ul, but below it.

Is there a simple way to inform the scrollpane to refresh the height of the
content inside it? or we have to recreate it?

Thanks in advance
Guillermo

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.13.39/1045 - Date: 2/10/2007
18:43





[jQuery] Re: jscrollpane plugin problem

2007-10-04 Thread Kelvin Luck


Maybe! I haven't used jQuery live yet so I couldn't say. Do you have an 
example of it working like this?


Cheers,

Kelvin :)

Alexandre Plennevaux wrote:

isn't the jquery live plugin exactly meant to do that? I have it work here
along with jscrollpane and it works perfectly. 


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kelvin Luck
Sent: jeudi 4 octobre 2007 21:21
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jscrollpane plugin problem


It shouldn't be too slow to call jScrollPane on your div after everytime you
add content to it. Is this what you tried?

I just did a quick bit of playing around with making the scroll pane
automatically update itself and got it working in Firefox thanks to the
DOMNodeInserted event but couldn't find an alternative in IE. I have an idea
for a workaround but no time to work on it until the weekend...

Cheers,

Kelvin :)

Guillermo Movia wrote:
Hi, thanks for your answer. We tried this, but when a lot of news are 
too slow.  We wish to know if maybe there's another solution.


Guillermo

2007/10/3, Alexandre Plennevaux [EMAIL PROTECTED]:
AFAIK you have to recall the function, or you can use the jquery live 
plugin



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] 
On Behalf Of Guillermo Movia

Sent: mercredi 3 octobre 2007 19:46
To: jquery-en@googlegroups.com
Subject: [jQuery] jscrollpane plugin problem


Hi, Kevin. We are using your plugin for a ul with news. Each new show 
by default the title and an abstract with a button to display the 
invisible part. This ul has a scroll pane. But, when the invisible 
part of one new is show and then the ul increase it height, the 
scroll pane doesn't change it height, and the new text overflow the ul,

but below it.
Is there a simple way to inform the scrollpane to refresh the height 
of the content inside it? or we have to recreate it?


Thanks in advance
Guillermo

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.13.39/1045 - Date: 
2/10/2007

18:43





Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.14.0/1048 - Date: 3/10/2007
20:22
 



[jQuery] Re: jScrollPane.. css blindness?

2007-09-23 Thread Kelvin Luck


Hi,

I had a quick look at your page and you need to add the winXP class to 
the TD which contains the jScrollPane rather than to the element you are 
applying the jScrollPane to. The element you apply jScrollPane too is 
wrapped in another element (the jScrollPaneContainer) which contains the 
scrollbar track and arrows. So the track and arrows don't actually exist 
inside the original element. Which is why your CSS isn't working as is...


Simply change these two lines:

td valign=top
div id=vdlGuide class=text-right winXP

To:

td valign=top class=winXP
div id=vdlGuide class=text-right

And it should work fine (you'll need to make sure you have the 
windows_arrow_up.gif and windows_arrow_down.gif files in your images 
folder too),


Hope that helps,

Kelvin :)

Birgit Pauli-Haack wrote:

Hi,

with the JscrollPane I try to implement one of the OS css versions and I 
just can't get the images to show. Somehow I must not understand the CSS 
interdependencies correctly or I am making a plain stupid mistake. 
Anything is possible right now..
I have the image files in the right directory, and I think the path is 
right.
If someone has a moment to put a second set of eyes on the page, I would 
really appreciated it.


http://www.aero-tv.net/index.cfm?do=app.testscrollbox

Thanks

Birgit




[jQuery] Re: jScrollPane.. css blindness?

2007-09-23 Thread Kelvin Luck


Hi,

It looks like you are loading the content into your jScrollPane using 
AJAX. If you change the contents of the jScrollPane you need to 
re-initialise it after changing the content. You can see this in action 
on example 4 on this page:


http://kelvinluck.com/assets/jquery/jScrollPane/basic.html

It looks like you are using Spry to do the AJAX calls - I'm not sure if 
that gives you an event you can hook into once the load is complete? 
Otherwise you could easily switch to using jQuery to make the AJAX calls.


Hope that helps,

Kelvin :)

Birgit Pauli-Haack wrote:

Now, there is an interesting phenomenon.

As there are other elements in that table td I created another div 
class=WinXp around the jscrollPane but now it scrolls past the content 
of the pane.. somtimes..At the end of the content there is still space 
on the scroll bar, the slider is not at the bottom yet, so I can scroll 
past the end and get some more white space to look at.

http://www.aero-tv.net/index.cfm?do=app.testscrollbox

Compare:
click on Today or News scrolling down, end of list = end of 
scrollbar
click on Sport Aviation scrolling down, the end of list scrolls by and 
there is still white space to go before the end of the scrollbar is reached.


It seems to be quite inconsistent or am I overlooking something again?

Birgit

On 9/23/07, *Kelvin Luck* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



Hi,

I had a quick look at your page and you need to add the winXP class to
the TD which contains the jScrollPane rather than to the element you are
applying the jScrollPane to. The element you apply jScrollPane too is
wrapped in another element (the jScrollPaneContainer) which contains the
scrollbar track and arrows. So the track and arrows don't actually exist
inside the original element. Which is why your CSS isn't working as
is...

Simply change these two lines:

td valign=top
div id=vdlGuide class=text-right winXP

To:

td valign=top class=winXP
div id=vdlGuide class=text-right

And it should work fine (you'll need to make sure you have the
windows_arrow_up.gif and windows_arrow_down.gif files in your images
folder too),

Hope that helps,

Kelvin :)

Birgit Pauli-Haack wrote:
  Hi,
 
  with the JscrollPane I try to implement one of the OS css
versions and I
  just can't get the images to show. Somehow I must not understand
the CSS
  interdependencies correctly or I am making a plain stupid mistake.
  Anything is possible right now..
  I have the image files in the right directory, and I think the
path is
  right.
  If someone has a moment to put a second set of eyes on the page,
I would
  really appreciated it.
 
  http://www.aero-tv.net/index.cfm?do=app.testscrollbox
 
  Thanks
 
  Birgit
 
 




[jQuery] Re: Scrolling a div area without scrolling the page?

2007-08-16 Thread Kelvin Luck


Hi,

I'm not sure I understand you about the jQuery plugin version - it's 
already a jquery plugin!


I've also just made the adjustment which allows you to pass a jQuery 
selector to the scrollTo method and added another example at the bottom 
of the page here:


http://kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html

Cheers,

Kelvin :)

[EMAIL PROTECTED] wrote:

Hi,

Thank you for your reply -- this solution presents itself exactly what
I was looking for.

Can't wait to use the jquery plug-in version -- do you have any idea
when you might have that available?

Matthew

On Aug 14, 2:48 am, Kelvin Luck [EMAIL PROTECTED] wrote:

Hi,

You can do this if you are using my jScrollPane and it's scrollTo method:

http://kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html

I'm just about to make an improvement which will allow you to pass in a
jQuery selector for the object you want to scroll to as well as a pixel
position - keep an eye on the following ticket to know when it's been added:

http://jquery.com/plugins/node/348

Hope that helps,

Kelvin :)

[EMAIL PROTECTED] wrote:

Hi,
I don't know if jquery will be able to address this but I thought I
would try anyway.
Is there a way to scroll a div area (which has an overflow:auto) to an
anchor point within the div without scrolling the page (i.e., the page
should remain stationary)?  In other words, is there a way to use
jquery to animate the div when an anchor tag is clicked?
I've coded a basic html example athttp://matthewmoore.info/jquery/example.html.
You'll see the page scroll when you click on a letter at the top of
the div.
Any ideas?
Thanks in advance,
Matthew




[jQuery] Re: Scrolling a div area without scrolling the page?

2007-08-16 Thread Kelvin Luck


Done!

http://kelvinluck.com/assets/jquery/jScrollPane/scrollToSpeed.html

The animation of the scrolling is very basic at the moment but it should 
do the job... At some point in the future I will think about trying to 
change the animation to use jQuery's animation function and the easing 
plugin - I've set up a ticket to remind myself here:


http://jquery.com/plugins/node/357

Cheers,

Kelvin :)

Alexandre Plennevaux wrote:
Woonderful! Could you also make the scroll speed as an option? 


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kelvin Luck
Sent: jeudi 16 août 2007 12:41
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Scrolling a div area without scrolling the page?


Hi,

I'm not sure I understand you about the jQuery plugin version - it's already
a jquery plugin!

I've also just made the adjustment which allows you to pass a jQuery
selector to the scrollTo method and added another example at the bottom of
the page here:

http://kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html

Cheers,

Kelvin :)

[EMAIL PROTECTED] wrote:

Hi,

Thank you for your reply -- this solution presents itself exactly what 
I was looking for.


Can't wait to use the jquery plug-in version -- do you have any idea 
when you might have that available?


Matthew

On Aug 14, 2:48 am, Kelvin Luck [EMAIL PROTECTED] wrote:

Hi,

You can do this if you are using my jScrollPane and it's scrollTo method:

http://kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html

I'm just about to make an improvement which will allow you to pass in 
a jQuery selector for the object you want to scroll to as well as a 
pixel position - keep an eye on the following ticket to know when it's

been added:

http://jquery.com/plugins/node/348

Hope that helps,

Kelvin :)

[EMAIL PROTECTED] wrote:

Hi,
I don't know if jquery will be able to address this but I thought I 
would try anyway.
Is there a way to scroll a div area (which has an overflow:auto) to 
an anchor point within the div without scrolling the page (i.e., the 
page should remain stationary)?  In other words, is there a way to 
use jquery to animate the div when an anchor tag is clicked?

I've coded a basic html example

athttp://matthewmoore.info/jquery/example.html.
You'll see the page scroll when you click on a letter at the top of 
the div.

Any ideas?
Thanks in advance,
Matthew


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.483 / Base de données virus: 269.11.19/953 - Date: 14/08/2007
17:19
 



[jQuery] Problem with jQEm and scrolling divs on FF

2007-08-16 Thread Kelvin Luck


Hi,

I've just added the ability for jScrollPane to work with jQEm so if a 
user changes the text size in their browser the jScrollPane 
automatically updates itself.


In doing so I think I've come across an issue with jQEm and scrolling 
divs in Firefox (PC). An example is worth a thousand words so check this 
example page to illustrate the problem:


http://kelvinluck.com/assets/jquery/jQEmIssue/jQEmBug.html

Any ideas of what is happening?

Cheers,

Kelvin :)


[jQuery] Tweaks to jCarouselLite

2007-08-15 Thread Kelvin Luck


Hi,

I've just tried to implement jCarouselLite [1] on a project I'm working 
on. Nice plugin - perfect for my needs of a lightweight carousel for 
this project :)


But I came across a couple of problems. For some reason, when I set 
circular to false the carousel stopped animating for me. Not sure why as 
it works on the example on the authors site - maybe because my carousel 
had more items in... Or maybe because I have more than one carousel on 
the page...


I also wanted to update the state of the previous and next buttons when 
the plugin initialised and set them to disabled if necessary. So I made 
a couple of changes to the plugin - you can get the changed file here:


http://kelvinluck.com/assets/jquery/jCarouselLite/jquery.jcarousellite.js

And a patch showing the changes here:

http://kelvinluck.com/assets/jquery/jCarouselLite/jquery.jcarousellite.js.patch

Hope that's helpful,

Kelvin :)

[1] http://www.gmarwaha.com/jquery/jcarousellite/


[jQuery] Re: appfuse: jQuery + scriptaculous + datePicker

2007-08-08 Thread Kelvin Luck


Hi,

Have you seen this page?

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

Hope it helps,

Kelvin :)

syg6 wrote:

Hello all.

I posted this over at Appfuse's Nabble list as first, but then thought
this would be the better place.

I have a default.jsp page that uses SiteMesh to 'decorate' all of my
jsps. It contains the following js libraries:

prototype.js
scriptaculous.js
global.js

In order to use datePicker you need the following js libraries:

jquery-1.x.js
date.js
jquery-dimensions.js
jquery-datepicker.js

I put those 4 js files in my test.jsp file. But when the test.jsp page
is rendered, including all the stuff in default.jsp, Firefox goes
berserk. I get thousands of js errors, all in effects.js:


this._base has no properties, http://localhost:8080/scripts/effects.js, Line 516


This also happens if I put my jquery.js in default.jsp after
scriptaculous.js. However, if I put it before scriptaculous.js I get
no errors. But my calendar doesn't work! No errors, just doesn't
appear!

And if I comment out scriptaculous.js in default.jsp, and leave
jquery.js in test.jsp, my calendar works. Oddly enough, the calendar
appears in the bottom left corner of the screen and without any
styles. It seems it's not grabbing either the datepicker.css or
demo.css it needs, I don't know.

Anyone ever used datePicker, or more generally, scriptaculous +
jquery? It seems that the order you put them in your page is
important. It seems like if you put jquery after scriptaculous it goes
into a loop, when jquery's constructor is called, and never exits.

Thanks!
Bob



[jQuery] Re: appfuse: jQuery + scriptaculous + datePicker

2007-08-08 Thread Kelvin Luck


Because you are using jQuery in noConflict mode you can no longer use $ 
to create jquery objects. So you need to replace:


$('.date-pick').datePicker({clickInput:true});

with:

jQuery('.date-pick').datePicker({clickInput:true});

Hope that helps,

Kelvin :)

syg6 wrote:

Thank you both, Kelvin and Klaus, for your replies.

Yes, I saw that page and after a quick read decided (incorrectly) it
was above my jQuery pay-grade and that it didn't apply to me. But as
it turns out, if I put the jQuery.noConflict(); line in my page before
calling the datePicker() function, the errors go away. Excellent!

... but my calendar doesn't appear! :( No errors, but no calendar. I
think I have everything configured correctly:

I include the jquery-1.1.2.js, date.js, date_es.js,
jquery.dimensions.js, and datePicker.js libraries
I include the datePicker.css and demo.css style files
I include the snippet of js code that defines the datePicker - $
('.date-pick').datePicker({clickInput:true});
I create an input that has the 'date-picker' style class

And the calendar doesn't appear. There's no link next to the input nor
is the input click-able. What could I be doing wrong?

Many thanks!
Bob


[jQuery] Re: datePicker: How to allow choosing dates in the past?

2007-08-01 Thread Kelvin Luck


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

2007-07-26 Thread Kelvin Luck


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: Is it possible so scroll all the way to the end a div overflow: scroll; ?

2007-07-26 Thread Kelvin Luck


I have an example which does this in my jScrollPane plugin. You should 
be able to use the logic of getting the y-position regardless of whether 
or not you are using the plugin:


http://kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html

Hope that helps,

Kelvin :)

fambizzari wrote:

Then, another question i would have is, how do you find the y-position
of an element within the div to know how to scroll down to it.



[jQuery] Re: DatePicker | adding multiple selectedDates into input field

2007-07-20 Thread Kelvin Luck


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 v2 beta

2007-06-07 Thread Kelvin Luck


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: Problem using jScrollPane with .load

2007-06-06 Thread Kelvin Luck


Hi,

I'm not sure exactly what is happening here. One thing that stood out as 
I looked at your example using firebug was that you are applying the 
jScrollPane to the tbody. This means that a div gets inserted into the 
table between the table and tbody tags. To be honest, I'm surprised it's 
working at all! Can you apply the jScrollPane to the table itself? Or 
even wrap the table in a div with a height and overflow style and apply 
the jScrollPane to this. Oh - I just see you tried with a div as well...


Secondly, your returned table's tbody has the same id as the table 
already in your page. An id should always be unique in your document.


Thirdly, you don't seem to be re-executing the jScrollPane call after 
each ajax load. You need to re-execute jScrollPane whenever the contents 
of your page changes...


Hope that helps,

Kelvin :)

steve love wrote:

Hi all. I've got a table with 18 rows that I'm forcing to scroll along
the y axis. I'd like to be able to theme the scroll bar using
jScrollPane, but I'm having an issue with loaded content. It works as
expected when the functions are called on the same page as the table,
but when I insert the table from another page with .load, the
jScrollPaneContainer div is hidden.

a href=http://www.stevelove.org/example/;Here's a link/a to an
example.



[jQuery] Re: datePicker v2 beta

2007-06-05 Thread Kelvin Luck


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

2007-06-05 Thread Kelvin Luck


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

2007-06-01 Thread Kelvin Luck


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: Improved timePicker, time/datePicker demo

2007-05-30 Thread Kelvin Luck


Anders wrote:


I've been working on improving Sam Collet's original timePicker.

Here is the result: http://labs.perifer.se/timedatepicker/

The demo is a Google Calendar-like time/datePicker. It's far from
perfect, most of the issues are with the datePicker though, which for
example not yet have support for focus/blur. Kelvin? ;)

/Anders

Hi,

Sorry for the slow response. I don't feel that the date picker should 
have support for focus/ blur unless (until?) it has full keyboard 
support. If I tab into a text field and a date picker I can't interact 
with pops up and I can't use a mouse then how do I enter a date?


If you want this functionality you can easily add it by adding the 
following code to your page:


$('input.date').bind(
'focus',
function()
{
$(this).dpDisplay();
});

(untested but should work).

Hope that helps,

Kelvin :)


[jQuery] Re: datePicker v2 beta

2007-05-21 Thread Kelvin Luck


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?

2007-05-20 Thread Kelvin Luck


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

2007-05-20 Thread Kelvin Luck


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

2007-05-20 Thread Kelvin Luck


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: kelvinluck - date-picker V2

2007-05-16 Thread Kelvin Luck


Sam Collett wrote:

On May 15, 11:21 pm, Kelvin Luck [EMAIL PROTECTED] wrote:

Hi,

Sorry about the console.log statement - I should have removed that...

I'm afraid I don't have IE7 here to test with... Can you confirm that
you experience the problem on my demo page:

http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerInto...

If you do and can give me any further information from the error then I
can look into it. If the problem doesn't exist on my page then can you
post a link to your page and we can try and look into it...

Thanks,

Kelvin :)


Works fine for me in IE7. I've been using it a while for a site I have
been working on (internal use, so no link).


Thanks for checking,

Cheers,

Kelvin :)


[jQuery] Re: kelvinluck - date-picker V2

2007-05-16 Thread Kelvin Luck


Vincent Majer wrote:


In fact, the code on your demo page works with IE7..
seems it's my integration of your plugin which is not good..
maybee an interaction with other scripts running on that page, i'll 
search.. thanks anyway for that plugin.. very helpful



Cool. Good lick with the integration,

Cheers,

Kelvin :)


[jQuery] Re: kelvinluck - date-picker V2

2007-05-15 Thread Kelvin Luck


Hi,

Sorry about the console.log statement - I should have removed that...

I'm afraid I don't have IE7 here to test with... Can you confirm that 
you experience the problem on my demo page:


http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html

If you do and can give me any further information from the error then I 
can look into it. If the problem doesn't exist on my page then can you 
post a link to your page and we can try and look into it...


Thanks,

Kelvin :)

Vincent Majer wrote:


another error fixed, in the jquery.datepicker.js, line 332
i've commented console.log(c) and it runs in IE6

BUT.. (arghh)

I've still got error.. on IE 7 !!! when the page loads :
Line 790
car 1
Syntax Error


nobody uses this great plugin ??





Vincent Majer a écrit :


ok, i've found an error in my date_fr.js, it's ok now..

When i load the page i don't have an error showing in IE6, BUT...

When i click the calendar icon, i've got another pretty error message :
Line 333
Car 4
Erreur : console est indéfini
Code : 0


... ??

Does anyone know what's this error ?


Vincent Majer a écrit :


Hi,

first, sorry for my english.. not perfect..

second point, i should say thanks to kelvinluck for this great jquery 
plugin, the DatePicker V2 !


I'm trying to use it.. and i have some problems with IE6..

I've used the source from this page of example :
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html 



But it seems the date.js file makes IE6 finds an error.. so it 
doesn't work..


here is my code :

First, the scripts to include :

script type='text/javascript' src='/js/jquery-1.1.2.js'/script
script type=text/javascript src=/js/date.js/script
script type=text/javascript src=/js/date_fr.js/script
script type=text/javascript 
src=/js/jquery.dimensions.pack.js/script
!--[if IE]script type=text/javascript 
src=/js/jquery.bgiframe.js/script![endif]--

script type=text/javascript src=/js/jquery.datePicker.js/script
link rel=stylesheet type=text/css media=screen 
href=/css/datePicker.css



And then :

script type=text/javascript charset=utf-8
$(function()
{
   // initialise the Select date link
$('#date-pick').datePicker(
// associate the link with a date picker
{
createButton:false,
startDate:'18/05/2007',
endDate:'11/12/2007'
}
).bind(
// when the link is clicked display the date picker
'click',
function()
{
updateSelects($(this).dpGetSelected()[0]);
$(this).dpDisplay();
return false;
}
).bind(
// when a date is selected update the SELECTs
'dateSelected',
function(e, selectedDate, $td, state)
{
updateSelects(selectedDate);
}
).bind(
'dpClosed',
function(e, selected)
{
updateSelects(selected[0]);
}
);
   var updateSelects = function (selectedDate)
{
var d = selectedDate.getDate();
var m = selectedDate.getMonth();
var y = selectedDate.getFullYear();
($('#d')[0]).selectedIndex = d - 1;
($('#m')[0]).selectedIndex = m;
($('#y')[0]).selectedIndex = y - 2007;
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
.bind(
'change',
function()
{
var d = new Date(
$('#y').val(),
$('#m').val()-1,
$('#d').val()
);
$('#date-pick').dpSetSelected(d);
});
   // default the position of the selects to today
var today = new Date();
($('#d')[0]).selectedIndex = today.getDate() - 1;
($('#m')[0]).selectedIndex = today.getMonth();
($('#y')[0]).selectedIndex = today.getFullYear() - 2007;
// and update the datePicker to reflect it...
$('#d').trigger('change');
});
/script


It works well with Firefox But IE6 complains about a missing ] on 
line 7, car 94.. code : 0.. i don't know what to do to make it work.. 
and that line/char reference doesn't mean anything.. BUT the error 
message changes when i remove the date.js from the called scripts.. ?


Any helps or advices .. ?

Thanks !!









[jQuery] Re: datePicker v2 beta

2007-04-30 Thread Kelvin Luck

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/datePickerCustomCellRender.html

 Transparency (could probably be done with CSS)


Yeah - I think this should be done in the CSS.

Thanks for the feedback,

Kelvin :)




[jQuery] Re: datePicker v2 beta

2007-04-30 Thread Kelvin Luck

On Mon, April 30, 2007 12:30 pm, Sam Collett wrote:

 Just thought of something else - an onDateChanged event. Could be
 useful for date pickers that depend on each other (i.e. a date range,
 defined by two pickers - 'picker2' has to be a later date than
 'picker1')


I'm guessing you didn't see the Start and end date pickers example either?

http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html

There are a number of custom events thrown by elements with date pickers
attached to them dateSelected, dpClosed, and dpMonthChanged. They are
described in more detail (along with descriptions of the arguments they
recieve) in the documentation (inline or HTML),

Hope that helps,

Kelvin :)



[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

Thanks for the feedback Luke...


 Is there any way to use the datePicker with the keyboard? I couldn't
 figure out how to open it without clicking the calendar icon (which I
 couldn't tab to).


I can pop up the calendar with the keyboard (in Firefox 2 and IE 6) - I can tab 
to it and then press return and it appears. But... This isn't much good because 
you can't select dates using the keyboard. It would definitely be nice to have 
full keyboard control but it's not a priority for me at  the moment (especially 
since it will probably add a fair amount to the file size of the plugin).

 When you're building the calendar, you might want to use the DOM methods
 (i.e. $(document.createElement('table')) for creating certain elements
 -- table, thead, tr, etc. --, it's much faster than $('table/table')
 in Safari.


Cool - thanks for the advise. I've implemented this in the version is svn 
(branches\kelvin-dev\plugins\datePicker) and it seems to have given an 
approximately 10% speed increase to renderCalendar in the PC browsers. Can you 
let me know if it's helped in Safari?

Thanks,

Kelvin :)


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

 Looks fantastic, Kelvin! I showed it to our lead engineer who has been
 assessing date packages and he said he'd drop his current date package in a
 heartbeat for this one IF someone had built a server-side version of it
 (.NET). So, if anyone takes on that challenge let me know. I long for the
 day when I don't have to deal with the rat's nest of code that the  Peter
 Blum date control generates.


Thanks :) I'm curious - why is there a need for a serverside version of this 
control? What exactly would it do? Is it just so that users without JS could 
get date picking functionality? What context are you using the date picker in?

Cheers,

Kelvin :)


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

On Wed, 25 Apr 2007 08:34:06 +0100, Ariel Jakobovits [EMAIL PROTECTED] wrote:

 I just added this to my site. Very nice plugin. You should be proud. One 
 question/request: set the format PER calendar, not globally with Date.

 Again, nice work. and thank you for the documentation.

 -Ariel

Great! Glad you like it...

I considered having the date format settable per calendar rather than globally 
but I couldn't think of a reason people would want calendar's with different 
date formats on the same page... How would you use this functionality?

Cheers,

Kelvin :)


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

 Works flawlessly in Safari 2.0.4 (build 419.3), comparing functionality
 and rendering with Firefox 2.

 However, there is a possible bug in this demo:
 http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html

 It lets you select invalid dates, such as Feb 31 with the dropdowns.
  While the resulting date in the calendar is sane (Mar 3 in the non-leap
 year that I tested with), there might be some validation code missing
 somewhere.


Hi,

Thanks for the feedback. Re. the invalid dates, I'm not sure where this should 
be corrected. You don't want to stop someone from selecting 31 in the date 
dropdown just because the month dropdown is on Feb (as they may be selecting 31 
and then planning to change the month dropdown).

I've made a bit of a compromise which is that when you open the date picker it 
will now automatically update the selects to the date selected in the date 
picker. Does this make sense to you? Obviously you would want to validate the 
dates in the selects before submitting if this was a real form but this tweak 
means that at least the date you see in the date picker is synchronised with 
the date on the selects..

Cheers,

Kelvin :)


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

On Tue, 24 Apr 2007 16:23:29 +0100, Daemach [EMAIL PROTECTED] wrote:


 Very cool - I can finally replace xin :)  One thing I had to hack into
 that code was the ability to trigger an event on the input field
 programatically after selecting the date.  Can you provide a
 triggerEvent(keyup|focus|change) parameter that will trigger the
 specified event in the attached input element when the date picker
 changes its value?


There are a number of custom events fired when the date picker is used. The 
following two might be interesting to you in this instance:

When a date is selected a dateSelected event is triggered on the relevant 
element and when the datePicker is closed a dpClosed event is fired.

You can see these events being used in the datePicker with custom listener, 
datePicker with multiple select and Start and end date pickers demos.

Do these events do what you need?

Cheers,

Kelvin :)


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

 it appears in IE7 that if you have clickInput: false you cannot drag to 
 select the text in the input field anymore.

I presume you mean if you have clickInput:true? The simple answer is not to use 
clickInput:true if you want people to be able to select the text! To tell the 
truth I wouldn't particulaly recommend using clickInput:true, it doesn't seem 
to intuitive or accessible to me - I just implemented it because it was a 
feature request from the old version of the plugin.


 also, i'd like to request that there be a 'Go To Today' link added (or 
 add-able).

That should be easy enough to add yourself if you want to. Something like the 
following (untested):

$('DATEPICKER_ELEMENT').setSelectedDate((new Date()).asString())

(obviously with DATEPICKER_ELEMENT replaced by an expression to select the 
element you have bound the date picker to).

Hope that helps,

Kelvin :)


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

On Wed, 25 Apr 2007 13:04:59 +0100, Ariel Jakobovits [EMAIL PROTECTED] wrote:


 No, really, I mean clickInput: false. if its true, clicking before the drag 
 opens the calendar.

 but if it's false, i can't drag to delete a date i put there.


Weird! I don't have IE7 here so I can't test but does the same thing happen to 
you here:
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerTemp.html

As you can see, I've set inputClick:false in this example. Selecting and 
editing the field works fine for me. Setting inputClick:false should be the 
same as not setting it at all by the way - does your problem specifically 
appear when you set inputClick:false?

By the way. did the code for selecting today work for you?


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

 you are right. I just like to have customizations like that written right 
 there in the code where I apply the calendar plugin so future developers will 
 see it rather than have to hunt for the source of the date format. doesn't 
 really matter, its up to you.


It won't hurt to reset the date format in your page if you like. Just do 
something like:

Date.format = 'dd mmm ';

Obviously whatever you set in your page will override what is set in the 
date.js file.


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

On Wed, 25 Apr 2007 13:08:10 +0100, Ariel Jakobovits [EMAIL PROTECTED] wrote:


 sorry for 2 emails for one response.

 I don't mean Set to today I mean Go To Today in the calendar itself.

 see, if I type '123' in the date field, then click the calendar icon to open 
 the popup, the calendar will be on the startDate I defined, in my case 
 January 1, 2000.

 I don't want the user to have to click click click back to April 2007. I want 
 a little link that says Go to Today or Today to reset the calendar to 
 today's date.


Emails to the group seem to be arriving in the wrong order for me... That's why 
I asked about this in the other reply...

Anyway - I see. So you want a link within the calendar popup itself for 
today? Which would select today's date but not close the calendar? I can put 
that on the TODO list...


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

On Wed, 25 Apr 2007 14:25:19 +0100, Dan G. Switzer, II [EMAIL PROTECTED] 
wrote:


 Kelvin,

 I've implemented a new dpSetDisabled feature so that you can disable and
 reenable date picker instances. New demo here:

 http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerDisabled.h
 tml

 Just a quick behavioral quirk I noticed. After disabling the field, the
 cursor shows as the pointer/hand when you mouse over where the calendar
 button is.


Well spotted! I've made a little change to the CSS to help avoid this problem. 
I also modified the plugin so that the link doesn't have a title when it is 
disabled so that no tooltip shows up.

 I'm sure you hide the anchor instead of setting the display to none so that
 the layout doesn't change, but I could see this as a confusing behavior.

 Also, when you're tabbing through the DOM elements (using the [TAB] key)
 it'll stop on the hidden anchor.

 You could probably solve this problem by setting the original a href /
 anchor to display: none and then inserting a a name / anchor in its place
 (with a visibility: hidden.) You shouldn't be able to tab or click on a name
 anchor, but it should conform to the same class definitions.

That sounds like it might work but seems to me that it would add unnecessary 
complications to the plugin for what is quite a small reward... I would have to 
consider things like what happens if the user had added an id to the button 
and is using that to style it as well as simply swapping the elements. I did 
some experiements with trying to delete the href or set it to '' but they 
didn't seem to render the link untabbable. I think it's something I may revisit 
if (when?) I look at making the datePicker keyboard accessible...

Thanks for the feedback,

Kelvin :)


 Just an idea.

 -Dan






[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

I only just received this email even though it looks like it was sent 
yesterday... Is anyone else still having issues with the list lagging?


 Looking good. Lots of examples - although it would be nice to have
 some CSS samples as well (or 'style packs' - Outlook 2003, Google
 Calendar etc)

Yeah - that would be nice... If anyone wants to contribute some I'll gladly add 
them in :)


 Just need a time picker to complement it.

 I have worked on one (http://www.texotela.co.uk/code/jquery/
 timepicker/), but am unsure how to scroll to the currently selected
 time (like how it does in Google calendar when creating an event) as
 well as some other bugs (one of which can be fixed if I used the
 dimensions plugin).


Cool - the timepicker looks nice... Are you working on it now? I'm sure I saw 
the link through the google groups interface earlier and it looked completely 
different. It was using a select element then? And now you are creating some 
divs?


[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck


 I've found some issues in Opera 9:

 * Sometimes the calendar doesn't render instantly when browsing fast
 through the dates, which makes it close unintentionally. I've fixed it
 by setting a fixed hight and width on div#dp-popup in the CSS.

Yes - I was able to replicate this by clicking like a maniac. It doesn't seem 
to effect FF or IE... I've added min-height and min-width to the CSS...


 * When the calendar _starts_ with an arrow disabled the hand cursor
 doesn't turn up again even though it's enabled.

I managed to replicate this and have fixed it. Well - worked around it. To be 
honest it looked like a bug in Opera but it works if your rules are a bit more 
specific. Grab the updated stylesheet from my site...


 I also have some questions: :)

 * Would it be trivial to not use the dimension plugin (ok, it's only
 4.7 kb packed but anyway..)? I've done some CSS tests (think I might
 have showed it to you some time ago) which positions a DIV to e.g an
 input using CSS. I think Drupal uses a similar technique when
 positioning an autocomplete dropdown: http://perifer.se/test/datepickerCSS.htm

I don't think so. Considering that the date picker should work in any situation 
in any page. I think a lot of work has gone into making the dimensions plugin 
capable of doing exactly that would result in reinventing the wheel and 
probably making it slightly less round! By the way, the way the calendar is 
attached is different to how you show it in that demo, it is now attached to 
the end of the body and positioned absolutely (to allow more flexibility in 
positioning it in more situations).


 * Is email the preferred way or reporting bugs in plugins (in SVN) or
 should Trac (http://dev.jquery.com/newticket) be used instead?

Not sure in general but I would prefer email to the list while this plugin is 
in beta. Once it is released then Trac would probably make sense. It looks like 
the new plugins page will be somehow linked into the Trac system anyway which 
will help with this...


 Excellent plugin! /Anders


Thanks!

Kelvin :)




[jQuery] Re: datePicker v2 beta

2007-04-25 Thread Kelvin Luck

On Wed, 25 Apr 2007 22:20:16 +0100, Ariel Jakobovits [EMAIL PROTECTED] wrote:


 Does the Date.format field get reference within the datepicker function or 
 does it get copied when the function is run initially.

 So...

 Date.format = FORMAT_1

 jQuery('#1').datepicker();

 Date.format = FORMAT_2

 jQuery(#2).datepicker();


 What will a date from #1 look like when it is opened and used down the 
 road...FORMAT_1 or FORMAT_2?

It will look like FORMAT_2


[jQuery] datePicker v2 beta

2007-04-24 Thread Kelvin Luck

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

2007-04-24 Thread Kelvin Luck

Thanks Mike :)

On Tue, 24 Apr 2007 11:41:00 +0100, Mike Alsup [EMAIL PROTECTED] wrote:


 This is awesome, Kelvin!!  Works great in IE7.

 Mike

 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/





[jQuery] Re: datePicker v2 beta

2007-04-24 Thread Kelvin Luck

On Tue, 24 Apr 2007 16:53:27 +0100, Shelane [EMAIL PROTECTED] wrote:


 Is there a way to allow the user to select a date in the past without
 that being the default date shown?


Yes. Simply pass a startDate in when you initialise the date picker or call 
dpSetStartDate afterwards. The date picker defaults to showing todays month (as 
long as that is inside the limits of startDate and endDate) but you can control 
which month is shown by passing in month and year parameters when you 
initialise the date picker or by calling $().dpSetDisplayedMonth(m, y) on 
elements with date pickers associated.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: datePicker v2 beta

2007-04-24 Thread Kelvin Luck

Hi Dan,

 * When using clickInput:true, you might want to turn off autocomplete
 automatically for the field. When the browser's built-in autocomplete box
 gets triggered, it hovers over the data picker. Plus it looks a little
 weird.

Thanks for the info. My browser hadn't tried to autocomplete any of the fields 
so I hadn't seen this issue. You can also position the date picker so it 
doesn't necessarily have to overlay the input field (so you get the advantage 
of the autocomplete as well).


 * Comments in the datePicker.css to describe what each class affects would
 be really nice when styling new versions of the file.

OK - I'll try and do that. Although they should be fairly self explanatory and 
to tell the truth, I think a quick look around with firebug will be a lot more 
useful than my comments can be :)


 * The bind and renderCallbacks should make the plug-in *extremely*
 configurable. While I didn't dig into things too much, I couldn't think of
 anything you wouldn't be able to do w/the existing callbacks. It's always
 nice when you can create a plug-in that shouldn't require people modifying
 the source. :)

Yeah - I was surprised at how easy the start and end date example was to 
implement and how little code it took...

Thanks for the feedback,

Kelvin :)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: datePicker v2 beta

2007-04-24 Thread Kelvin Luck

On Tue, 24 Apr 2007 14:56:41 +0100, Diego A. [EMAIL PROTECTED] wrote:


 I'd just come across a scenario where events would have made
 datePicker more flexible and was thinking of passing the idea to you.
 http://groups.google.com/group/jquery-en/browse_frm/thread/8993bb17785c6d3b?hl=en

 There's no need. You've done it all!
 As a humble user of the datePicker plugin I would like to thank you
 for all your work, and the greatly improved v2.

 It's a clean 10 out of 10 from me.


Thanks :)