3

This help me for date picker,

Now in this date-picker i want today's date as selected by default.

can anyone help me how do set default date?

Thank you.

1
  • 2
    Maybe an example or jsfiddle would help. Commented Aug 28, 2015 at 5:27

1 Answer 1

5

In andgular material i have used this for datepicker and my issue of set current date is solved as follow,

Using AngularJs Controller,

HTML:

<input type="date" list="days" ng-model="transaction.date">

Javascript:

$scope.transaction.date = new Date();
(1) google components (2) datepicker demo (3) material demo
Sign up to request clarification or add additional context in comments.

1 Comment

@ESala material.angularjs.org/latest/demo/datepicker this one may be useful

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.