0

I am using this library. I am having trouble converting the date format. When I pick a new date it should display date in dd/mm/yyyy

John
  • 478
  • 4
  • 12
  • 25

1 Answers1

2
<input type="text" ui-date-format="dd/mm/yy" .../>

EDIT:

If you want the date on the input to appear in dd/mm/yy format as well, you need to init dateOptions with the format:

$scope.dateOptions = {
    dateFormat: 'dd/mm/yy',
}

And HTML:

<input type="text" ui-date-format="dd/mm/yy" ng-model="ngModel" ui-date="dateOptions"/>

updated fiddle

Daniel
  • 6,194
  • 7
  • 33
  • 59
  • 1
    But I want the date selected should appear in dd/mm/yyyy format in textbox itself – John Feb 29 '16 at 06:43