This question has been asked but for different result. People have had trouble using the date picker inside the modal dialog box and making the date picker show up (using the z-index property).
However i have simply copied the js used to make the datepicker work from the foot, but in the view for the modal popup. this then shows the date picker, but does not populate the selected input box with the selected date.
my code that works everywhere else is the following:
$('#datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
and the input in the modal dialog class is datepicker.
Im not sure what the solution i am asking for would be really. as the function works everywhere and does indeed show up (suggesting the jquery is working) but just not populate the input box with the selected date.... any ideas? ........
function modalfollow()
{
$('<div>').dialog({
title: 'Add Follow',
height: '350',
width: '400',
open: function ()
{
$(this).load('<?=base_url();?>leads/add_follow/<?=$this->uri->segment(3);?>/');
},
modal: true
});
// return false so <a> or <button> doesnt fire + reload page
return false;
}
this loads the modal box that loads the view.
it is at this level the datepicker does not work.