angular - Pass md2 datepicker value to api -


basically why i'm making post because want understand better md2 datepicker working principles. didn't see examples previously. task me @ moment make datepicker(time format) user can select time, , should passed afterwards rest api , been stored in database column (format: time -- looks : 00:34:02.000000). datepicker (angular2) code im executing datepicker(which shows time correctly)

  <md2-datepicker [(ngmodel)]="user.birthday"                     name="enabled_from_time"                     [type]="'time'"                     [format]="'hh:mm'"                     placeholder="{{ 'extensions.add_new_extension.enabled_from_time' | translate }}"                     fxflex="49%"     ></md2-datepicker> 

but when i'm trying debug shows message : invalid date

also tried add method (event)

settime($event){     this.user.birthday = moment($event).format('h:mm'); } 

question : how send time correctly api execute not null?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -