Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am creating dynamic UI/form using ngx-formly/bootstrap(not using material). I wanted to displayed datepicker control so I have displayed custom bsdatepicker control using ngx-bootstrap/datepicker. Now I want to apply internationalization to this datepiker. I have tried it by referring ngx-bootstrap's official website but facing issue while implementing it in ngx/formly giving console error "
Please load locale 'fr' before using it
". Any help will be appreciated.

What I have tried:

//datepicker.html
     <pre><input type="text" 
       id="dob-id" 
       class="form-control calendar" 
       placement="bottom" 
       bsDatepicker
       [formlyAttributes]="field"
       #dobDate="bsDatepicker" 
       [bsConfig]="bsConfig" 
       placeholder="YYYY-MM-DD"
       [class.is-invalid]="showError" style="width: 350px;">


It has component file as well but there is nothing any code and in main component where we declare schema imporeted BsLocalservice and injected in constructor.
BsLocalService.use('fr')
but it is giving error like "Please load locale 'fr' before using it"
Posted
Updated 18-Mar-20 6:51am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900