Question

I am using the datepicker in jquery ui version 1.10.4 which can produce the trigger button when set option by following:

    $('#datetimepicker').datepicker({
    dateFormat: 'yy-mm-dd',
    showOn: 'both',
    minDate: new Date()
});

But when run the script button was came under the input box. So, How Can I make the button the button inline with the input text box by any methods.

Thank you in advanced

Était-ce utile?

La solution

Try this,

<p>Date: <input type="text" id="datepicker"></p>

Jquery datepicker,

$(function() {
    $( "#datepicker" ).datepicker({
      showOn: "button",
      buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
      buttonImageOnly: true
    });
  });

Demo link http://jsfiddle.net/dhana36/rt4Q7/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top