Angular Material Date Picker Default Date Selected
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
![Sagar Naliyapara](https://lh6.googleusercontent.com/-xLaNL88x90A/AAAAAAAAAAI/AAAAAAAAAFU/HtZWwkXC94E/photo.jpg?sz=256)
Sagar Naliyapara
I love writing code and I am really passionate about it. Just another guy who is passionate about computers and coding. Self learning is my closest habit. Analytical skills, group work, Solid knowledge of web development especially back-end and always ready to do challenging work. Languages: php laravel laravel-5 codeigniter mysql javascript vue.js vuejs2 angularjs angular-material html css jquery ajax ツ Full Stack Developer ツ ##Social Connections [Facebook][2], [Twitter][3], [LinkedIn][4], [Quora][5], [Google +][6] Hangout with Me on [email protected] [1]: http://i.stack.imgur.com/L2NsJ.jpg [2]: https://www.facebook.com/naliyaparaspn [3]: https://twitter.com/naliyaparasagar [4]: https://in.linkedin.com/in/sagar-naliyapara-a660738a [5]: https://www.quora.com/profile/Sagar-Naliyapara [6]: https://plus.google.com/116733809028962626596/posts
Updated on June 07, 2022Comments
-
Sagar Naliyapara about 2 years
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.
-
Sagar Naliyapara over 8 years@ESala material.angularjs.org/latest/demo/datepicker this one may be useful