Effacer les filtres
Effacer les filtres

save the date by gui

2 vues (au cours des 30 derniers jours)
Khaled Al-Faleh
Khaled Al-Faleh le 1 Mai 2017
Hi guys I used the command uicalendar to determine the date but I want to save this date in variable ... I used this
a = uicalendar
but it doesn't save the date in variable a its just gave the properties..

Réponse acceptée

Jan
Jan le 2 Mai 2017
Modifié(e) : Jan le 2 Mai 2017
Did you read the documentation of uicalendar? See the example: You have to create a text uicontrol at first. The contents of the text field is set to the selected date directly.
To store the output in a variable, you need a wrapper function, which creates the text field at first and removes it afterwards:
FigH = figure('visible', 'off')
TextH = uicontrol(FigH, 'Style', 'text');
CalH = uicalendar('DestinationUI', {TextH, 'String'});
uiwait(CalH);
Date = get(TextH, 'String')
delete(FigH);
Does this work? I do not have the Financial Toolbox, therefore I cannot test this.
Alternatively, you can use a date picker from the FileExchange, e.g. the nice FEX: uigetdate or FEX: calendargui.
  1 commentaire
Khaled Al-Faleh
Khaled Al-Faleh le 2 Mai 2017
yes its work sir Thanks alot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Calendar dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by