I am using angular-bootstrap-datetimepicker for date time selection. I want to show dates in moment format "MMMM Do YYYY, h:mm a"("December 22nd 2016, 2:00 pm"). Is there any way to do it?
-
What do you mean by custom format ? Can you please mention the format in which you want ?Supradeep– Supradeep2016-12-27 07:39:14 +00:00Commented Dec 27, 2016 at 7:39
-
moment format "MMMM Do YYYY, h:mm a".Vaibhav Kumar Ambeshta– Vaibhav Kumar Ambeshta2016-12-27 07:49:28 +00:00Commented Dec 27, 2016 at 7:49
Add a comment
|
3 Answers
As per the documentation here
You can pass configuration options as a function or an object.
Selected Date: {{ data.date | date:'MMMM Do YYYY, h:mm a' }}
<datetimepicker data-ng-model="data.embeddedDate"
data-datetimepicker-config="{ startView:'day', minView:'day' }" />
1 Comment
Vaibhav Kumar Ambeshta
How to configure localDateValue in DateObject??
Here is the link, I refered
You can take a look at the documentation if required
Selected Date: {{ data.date | date:'MMMM Do YYYY, shortTime' }}
<datetimepicker data-ng-model="data.embeddedDate"
data-datetimepicker-config="{ startView:'day', minView:'day' }" />