0

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.

6
  • mean where it's use?in text box Commented Apr 14, 2017 at 7:02
  • can you please give me some hint how can used? Commented Apr 14, 2017 at 7:05
  • sure, angular-ui bootstrap is very popular library for bootstrap components in angular angular-ui.github.io/bootstrap/#datepickerPopup Commented Apr 14, 2017 at 7:06
  • with my code it's not possible?any mistake with my html? Commented Apr 14, 2017 at 7:08
  • 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? Commented Apr 14, 2017 at 7:13

1 Answer 1

1

i got the solution here i follow this link and used date picker :

http://www.encodedna.com/angularjs/tutorial/how-to-implement-jquery-ui-datepicker-in-angularjs.htm#comment-3255701689

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.