0

I have a jQuery dialogue box that displays a table and for the first header I have a Tooltipster that displays a dateStart and dateEnd input in order to apply a filter to the table. I want to use the jQuery datepicker within these inputs to select the date range however the datepicker doesnt show inside tooltipster. Can this be done?

Tooltip:

$jq('.dateFilters').tooltipster({
content: $("table" StartDate  "input class='datepicker' type='text' name='dateFilterStart' " +
            EndDate "input class='datepicker' type='text' name='dateFilterEnd'
});

jQuery:

$jq(".datepicker").datepicker();
Zulu
  • 8,765
  • 9
  • 49
  • 56
catw4x
  • 11
  • 2

1 Answers1

0

The plugin documentation suggests you should do this in the functionReady option:

$jq('.dateFilters').tooltipster({
    content: /* ... your stuff here ... */,
    functionReady: function() { $jq(".datepicker").datepicker(); }
});

Disclaimer: I've never used this plugin. This answer is based purely on the documentation provided in the link above.

blgt
  • 8,135
  • 1
  • 25
  • 28
  • Thanks so much! this works, however I had to remove the $jq from the datepicker and keep it as $ – catw4x Apr 09 '15 at 11:00
  • That should be whatever alias the jQuery object has in your application; `$` and `jQuery` are the default but you can set it to anything you like. If the answer helped you out consider ticking it – blgt Apr 09 '15 at 11:27
  • Just been testing this in Chrome (we use IE default .... i know) and the datepicker shows up fine but when you click previous or next month the tooltipster disappears before you can set date. Works fine in IE! go figure. – catw4x Apr 14 '15 at 10:13