javascript - Dateformat AngularJS in select dropdown -


i receive json data web api. json data consists of series of datetimes.

i want able select particular datetime dropdown list. there no problem populating list, formatting incorrect, , don't know how make right.

the selected datetime going used afterwards.

i'm using angular , don't mind using other 3rdparty tool moment.js

currently looks this:

enter image description here

edit: i'm populating dropdown in following way:

<select class="inputindkald" id="tidspunktdropdown" ng-model="indkald.tidspunkt" ng-options="tidspunkt.datetime tidspunkt in indkaldtidspunkt"><option value="">vælg...</option></select> 

i hope guys can me out.

[..old answer not relevant ...]

update:

i have never done myself have tried like:

<select      class="inputindkald"      id="tidspunktdropdown"      ng-model="indkald.tidspunkt"      ng-options="tidspunkt.datetime tidspunkt|date:'hh:mm:ss dd.mm.yyyy' tidspunkt in indkaldtidspunkt ">      <option value="">vælg...</option> </select> 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -