Community Software 24

Let me help to build your community! Future oriented!

 
    Connect with Facebook

jquery datepicker isssues

January 21, 2010 by Torsten Wesolek   Comments (1)

I had a problem with the datepicker, used e.g. in the wonderful Profile Manager plugin. There you can add new fields. Fields also can be dropdowns and dates. You have to download and install the plugin if you don't have already - it's really a must!

But:

If I picked up a date (in my case the users birthday) and saved the profile, the wrong day was saved.

Datepicker is able to give back the date in several formats. In this case the timestamp is used. But that timestamp is not localised in our version of jquery datepicker, and you have to do it yourself.

So the line 51 in mod/profile_manager/views/default/input/datepicker.php in the datepick function had to be changed to this:

$('#<?php echo $strippedname; ?>_alt').val($('#<?php echo $strippedname; ?>_alt').val()/1000 - new Date().getTimezoneOffset()*60);

As a result of my hint this plugin bug is fixed now.
But this hint could be helpful to some developer who would like to use this datepicker timestamp.

And thank you for mentioning me in Verson 5.1. of profile manager to Jeroen Dalsem Smile

Torsten Wesolek 846 days ago

And thank you for mentioning me in Verson 5.1. of profile manager to Jeroen Dalsem Smile

Torsten Wesolek 846 days ago