0

i want to push time in my database but when i push time my $scope.moreadditems variable its save wrong time please help me i am using angularjs check when i enter time 9:00 AM why this show different time

check jsfiddle i am adding below time its working fine add in tableenter image description here

but when i click show details its show different time and also this time in database why enter image description here

1 Answer 1

0

input[time] will always output datetime of 1970-01-01 + the time you inputed, see documentation here.

If you just want to keep the time part, you can use filter date to pick it, and don't forget to inject $filter first.

var timeHHMM = $filter('date')(time, 'hh:mm');

refer demo.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.