Open rahulgadhyan opened 6 years ago
Can you paste some template code and why the end date-time is set to today?
this is how the code is handled in html:
And have the following code in javascript (using angular framework):
$scope.setMaxStartDate = function () { $scope.closeAlert(); if($scope.fromDate == null) $scope.maxStartDate = $scope.toDate; $scope.checkStartEndDate(); }
$scope.checkStartEndDate = function () { $scope.closeAlert(); if($scope.fromDate > $scope.toDate) $scope.toDate = null; //if($scope.toDate==null && current system time = AM && $scope.fromDate = yesterday PM) then set $scope.toDate as $scope.fromDate }
im using this code in an app. Now if current system time is say 17/5/18 - 9:00 AM.
I need to set the start and end date as follows:
start: 16/5/18, 10:00 PM
end: 16/5/18, 11:00 PM
I select the start date and enter as required.
Then I select the end date. currently it shows 17/5/18. If i select 17/5/18, i get the time auto set at 9:00AM, i.e. the current time.
This is the expected behaviour.
However, when i click the end date and select 16/5/18. I guesss, the time still refers to 9:00 AM so, effectively the ref is to 16/5/18-9:00AM
Now as i have set that the end date has to be greater than start date, i am not able to select anything as 16/5/18-9:00AM is lesser than the already selected start date.
If I try to select PM, as the hour reading refers to 9, it will point to 9:00PM which is still smaller than 10:00PM selected in the start date.
So it does not allow me to select PM. I am completely stuck.
I hope i have been able to clear my question
Thanks for your time
Regards
Rahul
On Wed, May 16, 2018 at 5:56 AM, Michel Couillard notifications@github.com wrote:
Can you paste some template code and why the end date-time is set to today?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/logbon72/angular-material-datetimepicker/issues/130#issuecomment-389356324, or mute the thread https://github.com/notifications/unsubscribe-auth/Ac1kGswAbDZ0FjJMRLfwhCbU4nnRzeLeks5ty3IwgaJpZM4T8t3q .
What version are you using? v1.15.1 ?
I tried to reproduce it with you code, but it's working as I think it should.
Please see my video of this: https://drive.google.com/file/d/1M-y5GL_SpNVzTdoaNmm_xuOiA866cMbh/view?usp=sharing
@rahulgadhyan have you found something?
Hi Michel,
I was busy with some other portion of our code. I shall try to work as directed this week. If the issue persists, I shall record the video and share it with you
Thanks a lot for your time and effort
Regards Rahul
On Thu, May 31, 2018 at 1:48 AM, Michel Couillard notifications@github.com wrote:
@rahulgadhyan https://github.com/rahulgadhyan have you found something?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/logbon72/angular-material-datetimepicker/issues/130#issuecomment-393304016, or mute the thread https://github.com/notifications/unsubscribe-auth/Ac1kGqpQInEmreSUsUJBl5LNUjhnFKK8ks5t3v6GgaJpZM4T8t3q .
Yes @rahulgadhyan you can record a video with something like Screencastify. And add many info as you can on how to reproduce it.
I fixed this in https://github.com/beenote/angular-material-datetimepicker/issues/54.
I am using start date and end date selection range with following condition: 1) end date cannot be less than start date
If the current system time is in AM, say 13/05/2018, 09:00 AM and i want to select date range as 12/05/2018-10:00PM to 12/05/2018-11:00PM.
After Selecting start date-time as 12/05/2018-10:00PM, i am not able to select end date-time as 12/05/2018-11:00PM because when I open the end date-time picker, it shown todays date, ie 13th (and time as 9:00 AM). and if I try to select 12th, it cannot select as 12/5/18, 9:00 AM is lesser than start date already selected.
I would like to know if there is a way to work around this particular isssue Thanks