How to set the date display date?

Dear, I have a date picker inside my form. after I click on the text field, the date picker will show up (back with a drop down list). How do I do this if I want to show the datepicker dropdown, not dropup? http://img413.imageshack.us/img413/1460/screenshot5g.png

+6
jquery jquery-ui drop-down-menu datepicker
source share
3 answers

Look for a solution in this post . Is this what you were looking for?

0
source share
$('.datetime').datepicker({ dateFormat: 'm/d/yy', beforeShow: function (input, inst) { var offset = $(input).offset(); var height = $(input).height(); window.setTimeout(function () { inst.dpDiv.css({ top: (offset.top + height + 4) + 'px', left: offset.left + 'px' }) }, 1); } }); 
+10
source share

Igor’s answer expands. To position the calendar in the lower right corner of the datepicker input element, use this:

 $('.datepicker').datepicker({ beforeShow: function (input, inst) { var offset = $(input).offset(); window.setTimeout(function () { var calWidth = inst.dpDiv.width(); var inpWidth = $(input).width() + parseInt($(input).css('padding')); inst.dpDiv.css({ left: offset.left + (inpWidth - calWidth) + 'px' }) }, 1); } }); 
0
source share

All Articles