-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to select end date when using date range in a specific case #130
Comments
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:
<ul>
<li class="row date-size">
<md-input-container flex-gt-md="90" class="dateInput date-size">
<input mdc-datetime-picker=""
date="true" time="true" short-time="true"
type="text" id="startDate"
placeholder="{{ 'STARTTIME' | translate }}"
show-todays-date=""
ng-model="$parent.fromDate"
show-icon="true"
auto-ok="true"
max-date="maxStartDate"
ng-change="checkStartEndDate()"
class=" dtp-no-msclear dtp-input md-input">
</md-input-container>
</li>
<li class="row">
<md-input-container flex-gt-md="90" class="dateInput date-size">
<input mdc-datetime-picker=""
date="true" time="true" short-time="true"
type="text" id="endDate"
placeholder="{{ 'ENDTIME' | translate }}" show-todays-date=""
ng-model="$parent.toDate"
show-icon="true"
auto-ok="true"
min-date="fromDate"
max-date="maxDate"
ng-change="setMaxStartDate()"
class=" dtp-no-msclear dtp-input md-input">
</md-input-container>
</li>
</ul>
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 ***@***.***> 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
<#130 (comment)>,
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: |
@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 ***@***.***> 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
<#130 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ac1kGqpQInEmreSUsUJBl5LNUjhnFKK8ks5t3v6GgaJpZM4T8t3q>
.
|
Yes @rahulgadhyan you can record a video with something like Screencastify. |
I fixed this in beenote#54. |
I am using start date and end date selection range with following condition:
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
The text was updated successfully, but these errors were encountered: