-1

I have a text feild with type equal to text.

<input type="text"  ng-model="date"/>
<p>{{date}}</p>
<input type="text" ng-model="date"> // should be able to see date in formatted form here.

When i select a date it p tag showing like.

2002-05-13T00:00:00

i want to show that in proper date format without using another plugin or type="date" because i'm using a plugin with dont have a proper way to format.

How to format the particular date using javascript ?

alexander.polomodov
  • 5,396
  • 14
  • 39
  • 46
vishnuprasad kv
  • 990
  • 5
  • 22
  • 46

1 Answers1

2

You can use date filter

Like this

{{date | date: 'dd/MM/yyyy'}}
Anik Islam Abhi
  • 25,137
  • 8
  • 58
  • 80