1
Friends, I have a question I would be happy if you could help me.
I have a calendar created with the <input type="date">
of Html5.
I need that by clicking on a specific date it takes the date value and calls a function PHP that will load a new page passing as parameter the date that was clicked for this PHP function.
I can do this with a button because I step as a parameter in the global variable $_GET
calling a PHP you will receive this information, but I need it done without the button Submit of form, yes at the click of the date. Someone knows how to proceed?????
To turn on when the date changes you can use the event
change
, you can show the code you already have with a button?– Sergio
Edit your question and enter the codes you’ve tried. It’ll make it easier to help
– Victor Eyer
It’s not that simple, the Onchange event you mentioned is triggered before it fills the new date in the input. So after calling the onchange it fills in the input date. How do I know the value of the input (or date) if it is triggered before it fills in the date?
– Marcelo José Lustosa Rodrigues
@Marcelojosélustosarodrigues change comes after choosing the date. Have a look here: https://jsfiddle.net/Sergio_fiddle/0thw8coh/1/
– Sergio
@Marcelojosélustosarodrigues if any of these answers solved your problem you can mark this as accepted.
– Sergio