Results 1 to 1 of 1
-
16th Feb 2012, 05:44 PM #1OPMemberWebsite's:
wscripts.net damnlolscript.com lulzjet.comJavascript and php time
I have this situation:
-i have a form with a field to select date (using jquery datepicker)
-i convert the date, using strtotime, to insert it to database
The issue is that the jquery datepicker is using the user timezone, but i want to use the server timezone.
Is possible to do it?
Edit: i managed to make something, i am setting the minim date with the server time.
Code:$new_date = date("D M j Y H:i:s",time()); echo '<script type="text/javascript"> $(document).ready(function() { $(".mws-dtpicker").datetimepicker({minDate: new Date("'.$new_date.'")}); }); </script>';
t3od0r Reviewed by t3od0r on . Javascript and php time I have this situation: -i have a form with a field to select date (using jquery datepicker) -i convert the date, using strtotime, to insert it to database The issue is that the jquery datepicker is using the user timezone, but i want to use the server timezone. Is possible to do it? Edit: i managed to make something, i am setting the minim date with the server time. Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Long time lurker, first time poster
By Opie in forum IntroductionsReplies: 1Last Post: 27th Sep 2012, 06:53 PM -
FB Likes, Google +1 JavaScript Load time
By nEw_boY in forum Web Application/Script SupportReplies: 0Last Post: 13th Oct 2011, 05:54 AM -
JavaScript Kit
By Daniel in forum Useful SitesReplies: 0Last Post: 7th Mar 2011, 06:48 PM -
Help About JavaScript
By macypro in forum Technical Help Desk SupportReplies: 1Last Post: 7th Dec 2010, 12:23 AM -
help with some javascript
By bumilad20 in forum Web Application/Script SupportReplies: 2Last Post: 3rd Jun 2010, 05:01 AM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...