Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jquery datepicker not open issue in modal #265

Open
lbrevity opened this issue Apr 3, 2019 · 1 comment
Open

Jquery datepicker not open issue in modal #265

lbrevity opened this issue Apr 3, 2019 · 1 comment

Comments

@lbrevity
Copy link

lbrevity commented Apr 3, 2019

I'm using this angularModalService to open dialog (with template url and controller defined) from one of my angular js controller like below :

           ModalService.showModal({
                    templateUrl: 'AddPage.html',
                    scope: $scope.ModelObj,
                    controller: "AddPageController",
                  inputs: {
                        RPA: $scope.lansArray
                    },
                });

and my template code is like ,

`<script type="text/ng-template" id="AddPage.html">

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog">
        <div class="modal-content">
            
                
                <div class="modal-body">
                    <div class="row">
                        
                        <label>Start Date</label>
                        <div class="input-group date">
                            <input type="text" class="form-control" ng-model="Obj.SeasonStartDate" id="StartDatePicker" name="StartDatePicker" required />
                            <span class="input-group-addon" ng-click="OpenCalender('StartDatePicker')">
                                <span class="glyphicon glyphicon-calendar"></span>
                            </span>
                        </div>
                    </div>
                </div>
         
        </div>
    </div>
</div>

</script>`

and in model controller , I have function
$scope.OpenCalender = function (id) {
document.getElementById(id).focus();
}

This function is called proper from dialog but it's not open my calendar control.

@dwmkerr
Copy link
Owner

dwmkerr commented Apr 4, 2019

Is it possible to share a santised gist or something like this? My concern is that it might be a jquery issue rather than an angular modal service issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants