Skip to content
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

DateTimePicker timeSelector did not show given selectedDateTime #288

Open
wzzaz opened this issue Apr 30, 2019 · 0 comments
Open

DateTimePicker timeSelector did not show given selectedDateTime #288

wzzaz opened this issue Apr 30, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@wzzaz
Copy link

wzzaz commented Apr 30, 2019

Your issue may already be reported!
Please search on the issue track before creating one.

Expected Behavior

give selectedDateTime a value and call open, DateTimePicker show given selectedDateTime

Current Behavior

DateTimePicker timeSelection show current time

Possible Solution

DateTimePicker.qml, line 39 onSelectedDateTimeChanged content original:
switch(mode) {
case FluidTemplates.DateTimePicker.Year:
if (yearSelector.selectedYear !== picker.selectedDateTime.getFullYear())
yearSelector.selectedYear = picker.selectedDateTime.getFullYear();
break;
case FluidTemplates.DateTimePicker.Month:
if (dateSelector.selectedDate.getTime() !== picker.selectedDateTime.getTime())
dateSelector.selectedDate = picker.selectedDateTime;
break;
default:
if (timeSelector.selectedTime.getTime() !== picker.selectedDateTime.getTime())
timeSelector.selectedTime = picker.selectedDateTime;
break;
}

my Solution:
if (yearSelector.selectedYear !== picker.selectedDateTime.getFullYear())
yearSelector.selectedYear = picker.selectedDateTime.getFullYear();
if (dateSelector.selectedDate.getTime() !== picker.selectedDateTime.getTime())
dateSelector.selectedDate = picker.selectedDateTime;
if (timeSelector.selectedTime.getTime() !== picker.selectedDateTime.getTime())
timeSelector.selectedTime = picker.selectedDateTime;

Environment

Include as many relevant details about the environment you experienced the bug in.

  • fluid 1.1.0
  • Qt 5.12
  • Windows 7
  • Desktop
@plfiorini plfiorini self-assigned this Jun 10, 2019
@plfiorini plfiorini added the enhancement New feature or request label Jun 10, 2019
@plfiorini plfiorini added this to the 1.2.0 milestone Jun 10, 2019
@plfiorini plfiorini modified the milestones: 1.2.0, Post 1.0 Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants