2

I am developing an angular js application. It's has one page, with an input as date. I need to add, a date as input.

Date Input

<input type="date" ng-model="InputDate" />

How can I do that?

1
  • Hope guide or simple example how to input date. Commented Sep 28, 2015 at 18:28

2 Answers 2

9

If you want a simple solution, considering you don't want to inject additional dependency just for a date-time picker in your application, go with the inbuilt method:

<input type="datetime-local" id="exampleInput" name="input" ng-model="example.value"
  placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />

More information on date-time picker | AngularJS API Reference

However, if your app requires date-time input in multiple views, then maybe you can also go with other, additional third party modules (just google for it). One of the major advantage of going this way would be to let your app users encounter a better UI/UX.

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

Comments

4

You can use Angular Bootstrap components : https://angular-ui.github.io/bootstrap/#/datepicker

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.