javascript - How to tell which datepicker the widget is open for -


this question similar check if datepicker open except pertains page has multiple datepicker controls on it.

when there multiple datepickers on page, jquery ui appears create 1 datepicker widget shared between of datepickers.

i attempting find way, through datepicker ui or otherwise, find out datepicker widget open for. unfortunately tried , true tests such as:

$('#somedatepicker').datepicker('widget').is(':visible'); 

return true regardless of datepicker widget open for, long visible somewhere.

after crawling through source code datepicker found related code around line 718:

inst = $.datepicker._getinst(input); if ($.datepicker._curinst && $.datepicker._curinst !== inst) {     ... } 

using code dug little more these internal objects , whipped fiddle. looks $.datepicker._curinst.id give id of textbox datepicker widget open for.

use @ own risk, object internal , undocumented , changed/moved/removed in future versions of library.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -