Click here to Skip to main content
12,831,317 members (49,800 online)
Rate this:
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 19:54pm
Updated 7-Dec-12 19: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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2017
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