trying to display datepicker in Impromptu prompt box?

2.6k Views Asked by At

I am trying to display ui datepicker ctrl in prompt box [ using impromptu jquery script]. Following is my code what I am trying.

var txt = 'Date: <input id="datepicker" name="date_picker" type="text" />';
$.prompt(txt).$('#datepicker').datepicker(); 

as per blog - impromptu this should work but it doesn't display the datepicker control in the prompt box!!

Please let me know if someone has any idea.

just for note:

script included in following order

ui.core.js ui.draggable.js ui.resizable.js ui.datepicker.js Impromptu.js

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

Your syntax needs a little adjustment:

var txt = 'Date: <input id="datepicker" name="date_picker" type="text" />';
$.prompt(txt);
$('#datepicker').datepicker();

You may need to also adjust the z-index of the datepicker in the css, at least in the old versions om impromptu this was true.