Skip to content Skip to sidebar Skip to footer

Textbox Is Not Working For Date Input

I have this code that is working except 1 thing and that is the following: When I type in the textbox a datepicker shows up, when the date is clicked the date is put in the textbox

Solution 1:

You didn't specified which datepicker plugin you using.

Though you have to make ajax call on the update event of datepicker rather on keyup event.

May be that can solve your problem.

Solution 2:

Try setting the content type

contentType:"application/json; charset=utf-8"

as far I know, if you dont set this, the server interprets this request as a normal post.

If this doesn't work, show what echo file_get_contents("php://input") is printing.

Solution 3:

Assuming you have all other codes correct in the php file, like out putting the result withn json_encode(), try changing the following code:

$opts = (isset($_POST['filterOpts']) ? $_POST['filterOpts'] : FALSE);
$val = (isset($_POST['text']) ? $_POST['text'] : FALSE);

to:

$opts = (isset($_POST['filterOpts'])) ? $_POST['filterOpts'] : FALSE;
$val = (isset($_POST['text'])) ? $_POST['text'] : FALSE;

Post a Comment for "Textbox Is Not Working For Date Input"