md-datepicker should accept null value for date initialization.
The md-datepicker returns null when date is not selected. It should also accept null value for date initialization. Currently, if I set null to required date value, it won't accept (it won't even initialize).
Sample: https://codepen.io/anon/pen/xwLPbP
mnanzawa this has bee fixed it supports it now pull latest
change your js code in codepen too: angular.module('MyApp').controller('AppCtrl', function($scope) { $scope.myDate = null;
$scope.minDate = new Date();
$scope.maxDate = new Date(); });
Thank you very much.
Confirmed with the HEAD version. It now accepts null as the start value. If the initial value is set to null, text input field shows "Enter date" as expected.
How to set calendar to past month when user first time open it? In our situation we have date of birth and other date option which should be of back date so we can apply max-date but when calendar open it shows half of current month and half of next month which is disable due to which we received lot of complain tickets.
Please help me.
Thank you very much @jsdev,Your solution is fabulas. You were very helpful for me