Click here to Skip to main content
11,811,971 members (67,559 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript PHP
Hi all,

I want to put a javascript datepicker in a while loop... but it didnt work for me...

Here is my code..
window.onload = function(){
		new JsDatePick({
<input type="text" name="dateFrom" id="dateFrom?>" value="<?php  echo $dateFrom ??>" style="width:70px;"  />
Posted 7-Dec-12 18:54pm
Edited 7-Dec-12 18:57pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

use jquery date picker that wil display date to text box

u just post to php file u get the date and time

<!doctype html>
<html lang="en">
    <meta charset="utf-8" />
    <title>jQuery UI Datepicker - Default functionality</title>
    <link rel="stylesheet" href="" />
    <script src=""></script>
    <script src=""></script>
    <link rel="stylesheet" href="/resources/demos/style.css" />
    $(function() {
        $( "#datepicker" ).datepicker();
<p>Date: <input type="text" id="datepicker" /></p>


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 KrunalRohit 319
1 Abhinav S 215
2 Palash Mondal_ 210
3 CHill60 180
4 CPallini 135
0 OriginalGriff 3,893
1 KrunalRohit 2,441
2 CPallini 2,240
3 Maciej Los 2,155
4 ppolymorphe 1,725

Advertise | Privacy | Mobile
Web02 | 2.8.151002.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100