javascript - Jquery datepicker calendar icon positioning -


i'm using jquery-ui datepicker. problem is, library inserts calendar icon straight after input field default. html markup bit different , want calendar icon appear somewhere else in dom, i.e. outside parent container of input field.

i tried add own <img/> manually , added class ui-datepicker-trigger, doesn't trigger anything.

how can decide icon should appear in dom , has work?

this want:

<div class="parent">     <input id="datepicker" class="hasdatepicker" type="text" /> </div>  <img class="ui-datepicker-trigger" src="images/calendar.gif" alt="..." title="..." /> 

not (default jquery-ui insertion):

<input id="datepicker" class="hasdatepicker" type="text" /> <img class="ui-datepicker-trigger" src="images/calendar.gif" alt="..." title="..." /> 

many thanks

try manually add trigger show datepicker on image click:

$("#datepickerimage").click(function() {     $("#datepicker").datepicker( "show" );;  }); 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -