+1 vote
106 views
i want to use date picker control to select the dates in my project..
Category
asked Jan 28, 2016 | 106 views
before adding further codes,you have to add a datepicker in your project ..have you added a datepicker ?
using NetBeans IDE...
have you added a datepicker ?
we need to design datepicker in html and then code in php..

1 Answer

0 votes
Best answer

Try this to design datepicker :

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"

href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script

src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

<script>
$(document).ready(function() {$("#datepicker").datepicker();
});
</script>
</head>
<body>
<form>
<input id="datepicker" />
</form>
</body>
</html>

Then use the value from the input type to your php code..please post if further errors

Edit 1 :

If you just want a simple datepicker try the code below :

<html>
<input type="date" name="datepick">
<input type="submit">
</html>

Note :

Previous codes have the google hosted files for their themes for the datepicker hence we used some href values

answered Jan 28, 2016
edited Aug 10, 2016
yaa working..tanq
but i don't understand why we need this part of codings...can u explain?

<link rel="stylesheet"

href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothnes

s/jquery-ui.css">
<script

src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></sc

ript>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-

ui.min.js"></script>

<script>
$(document).ready(function() {$("#datepicker").datepicker();
});
</script>
try removing them and run the code and let me know whether its working or not ? :)
2nd method is very simple to use..tanq