Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
BerryBlack13
Posts: 17
Registered: ‎04-09-2013
My Device: developer
Accepted Solution

DateTimePicker expanded state doesn't work in QML

I want to use the date and time picker in the expanded state when loading a
new page or sheet. I use the mode: DateTimePickerMode.DateTime. and set expanded
property to true. But in the date and time mode the picker will not be expanded.

I have tested it with the following code:

DateTimePicker {
            expanded: true
            mode: DateTimePickerMode.Timer
}
DateTimePicker {
            expanded: true
            mode: DateTimePickerMode.Date
}
DateTimePicker {
            mode: DateTimePickerMode.DateTime
            expanded: true
}

The result is that only the second (DateTimePickerMode.Date) datepicker is expanded.
The first and the last aren't expanded.
I have tested the DateTime picker in C++ and that works fine(it is expanded) . But it not
convenient for me to expose C++ code to QML.

What did I do wrong in the above code? Maybe it is an error.

Thanks in advance

Developer
sommily
Posts: 17
Registered: ‎04-06-2013
My Device: Z10

Re: DateTimePicker expanded state doesn't work in QML

Yes, That still a problem in NDK. Hope BlackBerry will fix it in next UpDate.
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: DateTimePicker expanded state doesn't work in QML

welcome to the support forums.
to make sure it is not missed i would suggest to file it on jira
https://www.blackberry.com/jira/secure/Dashboard.jspa
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
BerryBlack13
Posts: 17
Registered: ‎04-09-2013
My Device: developer

Re: DateTimePicker expanded state doesn't work in QML

Thanks sommily,

I figured out that when i use onCreationCompleted signal at the page, the expanded mode works:

Page {
    Container {
        DateTimePicker {
            id: test
            mode: DateTimePickerMode.DateTime
        }
        onCreationCompleted: {
            test.expanded = true
        }  

}

 

Maybe it is usefull.

Simon_hain i will report it to jira!