0
votes

I am create small demo for users on crud operation using angularjs web api. so here i have create one small form for the add user.in this form store date of birth filed so i want to need take a bootstrap date picker.but this text box on apply datepicker class is in store on ng-repeat so that time datepicker is not open on this text box. remove ng-repeat it's working fine. here below i have show my html any one know how can fix it please let me know.

this is my html page :

<div ng-repeat="btn in btnelement" id="{{$index}}">                      
<div class="row">
    <div class="col-md-6">
        <div class="form-group">
            <label>Date of birth</label>
            <input type="text" class="form-control datepicker" id="txtdob" ng-model="btn.dob" />                                        
        </div>
    </div>                                
</div>

this is script on document ready :

$(document).ready(function () {        
    $('.datepicker').datetimepicker({
        format: 'YYYY-MM-DD',
        icons: {
            time: "fa fa-clock-o",
            date: "fa fa-calendar",
            up: "fa fa-chevron-up",
            down: "fa fa-chevron-down",
            previous: 'fa fa-chevron-left',
            next: 'fa fa-chevron-right',
            today: 'fa fa-screenshot',
            clear: 'fa fa-trash',
            close: 'fa fa-remove'
        }
    });

this is date picker it's not working in ng-repeat with out ng-repeat it's working fine.

1
mean where it's use?in text box - coderwill
can you please give me some hint how can used? - coderwill
sure, angular-ui bootstrap is very popular library for bootstrap components in angular angular-ui.github.io/bootstrap/#datepickerPopup - tanmay
with my code it's not possible?any mistake with my html? - coderwill
actully this date picker it's match with my template that's why i m using this so i need on this date picker solution any idea about this? - coderwill

1 Answers