kartik-v / yii2-widget-datepicker

Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets)
http://demos.krajee.com/widget-details/datepicker
Other
112 stars 91 forks source link

Kartik Datepicker is not working inside renderAjax dynamic modal. #202

Open shubham-agr opened 2 years ago

shubham-agr commented 2 years ago

Prerequisites

Steps to reproduce the issue

  1. I followed this tutorial https://www.yiiframework.com/wiki/806/render-form-in-popup-via-ajax-create-and-update-with-ajax-validation-also-load-any-page-via-ajax-yii-2-0-2-3
  2. Added a kartik datepicker in _form.php file.
  3. When I click on open modal button the datepicker is not working.

Expected behavior and actual behavior

The datepicker should have worked normally but it is not opening inside modal.

I check in normal page it is working fine.

Most probably it can be because datepicker is not initialized when it is loaded dynamically inside modal. I have also modified the z-index also. But it looks like a JS error.

The create and update actions are working fine but only problem is datepicker or even select2 is not working.

Environment

Browsers

Operating System

Libraries

Isolating the problem

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.