Friday, March 15, 2013

jQuery mobile 1.3.0 - date input problem/bug on Android (quick fix)

I found that the date will be append to the end of the input (an input on Panel). When you pick a date 2nd time from the calendar, the old date will not be replaced and appended the new date at the end. This does not occur in Chrome.

The adhoc solution is clear the input manually before the user pick a new date.
e.g.

$('#date-input') .on('click',function(){
      $(this).val('');
});

3 comments:

tee said...

thank for the solution

tee said...

if you select other input text then back to select date again it will append in the place the cursor focus

early said...

@tee, u're welcome.

Since I only have one single input on that screen, I didn't know that it'll append at the end of the cursor when it's focus back. Thanks for your findings.