jquery-ui datepicker() does not work from a html opened using document.write

Multi tool use


jquery-ui datepicker() does not work from a html opened using document.write
I have a offline html document , which has the datepicker() functionality. When is use document.write(htmlcontent) to open this html, the datepicker() does not work.
The datepicker() works when page is opened from an online application. Any help will be greatly appreciated.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.