Code covered by the BSD License  

Highlights from
UIGETDATE

4.88889

4.9 | 9 ratings Rate this file 16 Downloads (last 30 days) File Size: 3.42 KB File ID: #8313
image thumbnail

UIGETDATE

by Elmar Tarajan

 

18 Aug 2005 (Updated 19 Aug 2005)

UIGETDATE displays a dialog box in form of a calendar.

| Watch this File

File Information
Description

UIGETDATE date selection dialog box
   T = UIGETDATE(D) displays a dialog box in form of a calendar
   
   UIGETDATE expects serial date number or standard MATLAB Date
   format (see DATESTR) as input data und returns serial date number
   for the selected date and time.

   UIGETDATE by itself uses the current date and time as input data

Example:
        t = datestr( uigetdate('16-Aug-1974 03:00') )

See also datevec, datestr, datenum

Acknowledgements
This submission has inspired the following:
PlotMeTheGreeks, uisetdate2
MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements tested under R13/R13SP1/R14/R14SP1/R14SP2/R14SP3
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
30 Aug 2005 Andreas Geissler

Hello, the M-File works great.
No problems !

10 Aug 2006 Kevin Delaney

Just what I was looking for!

26 Oct 2006 Malcolm Wood

This is really impressive.

04 Jan 2007 per isakson

It looks nice and works well. However, I encounter a minor issue. When I click the Close Button in the Title Bar "my" figure is closed together with the uigetdate figure. By stepping through the code with the debugger I see that <line 117 uiwait> closes the uigetdate figure and that <line 127 closereq> closes my figure. Don't ask me why (R2006b)! Commenting out <line 127> seems to solve the issue.

16 Aug 2007 Blaz Daskobler

Indeed a very handy tool, thanks a lot.
But, as a previous user observed, the "closereq" command (line 120 to be precise, not 127) needs to be commented out.
You close the uigetdate figure with the "X" (or Close) anyway, and that's why that "closereq" command closes the figure calling uigetdate.

03 Jun 2008 Gilles Criton

I have not yet practice a full test in order to see if there are some bugs, but at first glance, this function is very impressive and useful ! Thank you very much

09 Apr 2010 tal

Sorry for adding the rating twice. a small point is the try catch lines. If the gui is used in a parent gui the closereq command will close the main gui in case the x button was used to close the uigetdate. a solution can be to add the following lines between catch and end:
 out = [];
      if strcmp(get(gcf,'tag'),'uigetdate') % close only if calander is not close already
        closereq
      end

15 Jun 2010 Vincent De Paul

This is a fantastic DateGUI, as Matlab doesn't have such utilities. It can be easily integrated in any Matlab code, in which a calendar is need.

Great Job

17 Dec 2010 Deshan Yang

Fantastic. It is exactly what I need.

27 Jul 2011 Jan Simon

Hi Elmar! This is the the nicest and coolest GUI built by conventional MATLAB methods I've ever seen. Beside the usability, it is an excellent example for advanced programmers. Thanks!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
gui tools Elmar Tarajan 22 Oct 2008 07:56:14
example Elmar Tarajan 22 Oct 2008 07:56:14
uigetdate Elmar Tarajan 22 Oct 2008 07:56:14
uisetdate Elmar Tarajan 22 Oct 2008 07:56:14
calender Elmar Tarajan 22 Oct 2008 07:56:14
getdate Elmar Tarajan 22 Oct 2008 07:56:14
date Elmar Tarajan 22 Oct 2008 07:56:14
time Elmar Tarajan 22 Oct 2008 07:56:14
setdate Elmar Tarajan 22 Oct 2008 07:56:14
kalender Elmar Tarajan 22 Oct 2008 07:56:14
great job Vincent De Paul 15 Jun 2010 11:24:18

Contact us at files@mathworks.com