Pick a time in app

31 ビュー (過去 30 日間)
Johannes Hougaard
Johannes Hougaard 2020 年 5 月 27 日
回答済み: Johannes Hougaard 2020 年 5 月 27 日
Is it possible to pick a specific time of a specific day from an app?
The DatePicker component allows for selection of a specific date, but not a specific time at that date.
  2 件のコメント
Mohammad Sami
Mohammad Sami 2020 年 5 月 27 日
This feature is not available. I would suggest making a feature request.
Johannes Hougaard
Johannes Hougaard 2020 年 5 月 27 日
Thank you for the response (althoug it wasn't what I hoped for :D)
I ended up designing the feature myself in a separate mlapp (see attached in answer if you care to see it)

サインインしてコメントする。

採用された回答

Johannes Hougaard
Johannes Hougaard 2020 年 5 月 27 日
As apparently this feature has not been implemented in the app designer I decided on making an app of my own doing that exact thing.
The date and time string is stored in app.SelectedTime.Text e.g.
date_and_time = date_and_time = time_selector;
timestamp = datenum(date_and_time.SelectedTime.Text,'yyyy-mm-dd HH:MM:SS'); %While time_selector is open
The app is taking up to one input, which should be a uilabel from another app. In that case the output is assigned in the .Text for that label (e.g. in a pushbutton_callback with a corresponding label field)
function SelectStartTimeButtonPushed(app, event)
waitfor(time_selector(app.StartTimeLabel)); %Label for SelectStartTimeButton is StartTimeLabel
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by