Jump to content

Jquery Date time picker in php


princeofpersia

Recommended Posts

Hi guys I have a text box which uses datetimepicker in jquery and I have checked all the links, it shows the date time in text field but when i click inside the box it wont open the calendar, I do understand that is not a php question but I need to embed this to a pho code, so can u please help me to figure out how i should get it runing in a way that when i click on a text field in opens the calendar?

 

thanks in advance

 

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>jQuery UI Example Page</title>
	<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.6.custom.css" rel="stylesheet" />	
	<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
	<script type="text/javascript" src="js/timepicker.js">
</script>

<script type="text/javascript">  
$(function() {  
    $(?#datetime?).datepicker({  
      duration: ?,  
       showTime: true,  
         constrainInput: false,  
      stepMinutes: 1,  
     stepHours: 1,  
       altTimeField: ",  
      time24h: false  
});  
});  
</script> 

</head>
<body>
<input type="text" name="datetime" id="datetime" value="01.06.2009 00:00">
</body>
</html>


Link to comment
Share on other sites

Change this:

 

$(function() { 

    $(?#datetime?).datepicker({ 

      duration: ?, 

      showTime: true, 

        constrainInput: false, 

      stepMinutes: 1, 

    stepHours: 1, 

      altTimeField: ", 

      time24h: false 

}); 

});

 

to this:

 

$(function() { 

    $("#datetime").datepicker({ 

      showTime: true, 

      constrainInput: false, 

      stepMinutes: 1, 

      stepHours: 1, 

      time24h: false 

}); 

});

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.