0

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?

2
  • What do you mean by custom format ? Can you please mention the format in which you want ? Commented Dec 27, 2016 at 7:39
  • moment format "MMMM Do YYYY, h:mm a". Commented Dec 27, 2016 at 7:49

3 Answers 3

1

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' }" />
Sign up to request clarification or add additional context in comments.

1 Comment

How to configure localDateValue in DateObject??
0

You can defined the angular bootstrap format like :

uib-datepicker-popup="{{format}}"

format which you want to show like

uib-datepicker-popup="MMMM Do YYYY, h:mm a"

Comments

0

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' }" />

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.