This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 167
Default date range not working. #122
Comments
same issue |
I also have same issue. Unable to set any date as default value. Always show today's date. |
+1 |
having same issue.. anyone got some solution? |
same issue. Not able to set default date |
I have the same issue, the problem is the directive doesn't work when the startDate and endDate is the "child" of a Javascript Object. If you set the date this way it works. $scope.myDates = { But if you set the date this way it doesn't work $scope.data = { |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have implemented the library, but I have a problem to set the default date range when I try to set the default for the current month range, in my controller I have this:
In my view I have the following code:
<input type="daterange" ng-model="filters.dates" ranges="ranges" locale="locale" ng-change="changeRange()"/>
Image Example: http://prntscr.com/c27e9q
If I define a similar variable, but do not put in the ng-model of input, variable prints correctly with the values defined in the controller, but when used in the ngmodel, this is changed by a range that only
contemplates the day from today.
{{filters.another_dates}}<input type="daterange" ng-model="filters.dates" ranges="ranges" locale="locale" ng-change="changeRange()"/>
Image Example: http://prntscr.com/c27gy6
For some reason the ng-model resets the variable scope and assigns a default value different than I had defined.
I would also like to know if there is a way to define an empty value and not pre-load by default today's date.
The text was updated successfully, but these errors were encountered: