For school I have to make this simple working To-Do website. I have basically finished everything but I can’t seem to get ‘date’ working.
What I mean with that is that I want the user to be able to choose an expiration date. For example, it’s 18 april 2012 now and a user is making a task and wants to have it done before 22 april 2012. That should be the expiration date and the user should be able to choose that date. I don’t even need the task to be deleted when the time finishes but just that it shows on the task page that that’s the expiration date.
I have absolutely no clue on how to do this.. I was thinking about input fields for d-m-Y
and making it simple by posting it something like this
$date = $_POST['date'];
If someone knows where I can find a premade script for this I would surely appreciate it a lot as it’s been bugging me for days now.
If you just want something dead simple:
Markup:
PHP:
Note that the
dateinput type will gracefully degrade to atextinput for devices/browsers that don’t support it. You can optionally implement some kind of JS datepicker on top of this if you want to, but it’s not necessary.