For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Friday, April 17, 2015

jquery ui datepicker automatically delete text from input field

Problem:

Did you worked with jquery ui date picker? when assigned a default value to text filed, jquery ui datepicker will automatically delete text from that textbox field. So how to stop it?

Solution:

It seems the bug in jquery ui datepicker which is automatically delete text from input field. to overcome this problem you need to write 22 lines of code as example below:

Example:

// assume that the $edit_diesel_date is already filled with date value.
// write this code very bootom of your page.
function dook() {  $("#diesel_date").val("<?php echo $edit_diesel_date;?>");     }
setTimeout("dook();", 500);
Share:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive