Uidatepicker in app designer
Show older comments
Is there any way to place a uidatepicker element inside an existing app designer panel? The samples I've seen only show how to do that creating a new figure...
7 Comments
Omer Eker
on 8 Aug 2018
Hi Ricardo, I am new to appdesigner, but i like it very much. I didnt get whether you managed to see datepicker component in the component list (left pane). If not, how was your problem solved?
Ricardo Pedó
on 10 Aug 2018
Omer Eker
on 11 Aug 2018
Ricardo, thanks for the reply. Where do I put these 2 lines in my appdesigner codes?
Omer Eker
on 12 Aug 2018
OK managed to have the datepicker component in my panel. But it only appears when the button was clicked. I need it to be appeared all the time there, can we do that?
Omer Eker
on 12 Aug 2018
OK that one is sorted too :)
Ricardo Pedó
on 13 Aug 2018
Arshad Ilahi
on 3 Dec 2019
Hello Eker,
Can you share what you did for placeing a uidatepicker element inside an existing app designer panel?
Answers (5)
Chris Portal
on 21 Apr 2018
Edited: per isakson
on 21 Apr 2018
0 votes
You can pass the panel’s handle as the parent for the uidatepicker. The syntax is described here:
Ricardo Pedó
on 21 Apr 2018
Edited: per isakson
on 21 Apr 2018
1 Comment
Chris Portal
on 21 Apr 2018
Hmm, that’s what you need to do. What is the error you’re getting?
Ricardo Pedó
on 21 Apr 2018
0 votes
1 Comment
Chris Portal
on 21 Apr 2018
If you instead parent a button to the panel at the same line of code, does the button show up?
Ricardo Pedó
on 21 Apr 2018
0 votes
1 Comment
Chris Portal
on 21 Apr 2018
Edited: per isakson
on 21 Apr 2018
Sorry, I meant comment out your date picker line of code, and add this line of code:
b = uibutton(app.Panel);
Does the button show up in the panel? This will determine whether the issue is with date picker specifically or something else.
Ricardo Pedó
on 21 Apr 2018
0 votes
2 Comments
Chris Portal
on 21 Apr 2018
Edited: per isakson
on 21 Apr 2018
Thanks. It looks to be a positioning bug specific to date picker. You can work around it by doing the following:
p = uidatepicker(app.Panel, ‘DisplayFormat’, ‘dd-MM-yyyy’); p.Position(1:2) = [0 0];
I’ll report the bug for you. Thank you!
Ricardo Pedó
on 21 Apr 2018
Categories
Find more on App Building in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!