uicalendar
Graphical calendar
Syntax
Description
uicalendar( supports a customizable
graphical calendar that interfaces with one or more Name,Value)uicontrol.
uicalendar populates one or more uicontrol with
user-selected dates.
Note
As an alternative to uicalendar, you can use uidatepicker.
Examples
Create an uicontrol:
textH1 = uicontrol('style', 'edit', 'position', [10 10 100 20])
textH1 =
UIControl with properties:
Style: 'edit'
String: ''
BackgroundColor: [0.9400 0.9400 0.9400]
Callback: ''
Value: 0
Position: [10 10 100 20]
Units: 'pixels'
Call UICalendar:
uicalendar('DestinationUI', {textH1, 'string'})

Select a date and click OK.
Alternatively, you can use datetime arrays for InitDate and Holiday.
uicalendar('InitDate',datetime('15-Mar-2015','Locale','en_US'),'Holiday',datetime('16-Mar-2015','Locale','en_US'))

Select a date and click OK. For more information
on using uicalendar with an application, see Example of Using UICalendar with an Application.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Example: uicalendar('InitDate',datetime('15-Mar-2015','Locale','en_US'),'Holiday',datetime('16-Mar-2015','Locale','en_US'))
Flag to indicate nonbusiness days, specified using numeric values
of 0 or 1. The values are:
0— (Default) Standard calendar without nonbusiness day indicators.
1— Marks NYSE nonbusiness days in red.
Data Types: logical
Flag to indicate whether business and nonbusiness days, specified
using numeric values of 0 or 1.
The values are:
0 — Only allow selection of business days. Nonbusiness days are determined from the following parameters:
'BusDays''Holiday''Weekend'
1— (Default) Allows selections of business and nonbusiness days.
Data Types: logical
Color of date squares, specified using [date R G B],
where [R G B] is the color.
Data Types: double
Color of numeric date number in the date square, specified using [date
R G B], where [R G B] is the color.
Data Types: double
Destination object's handles, specified with values H or {H,
{Prop}}. The values are:
H— Scalar or vector of the destination object's handles. The default UI property that is populated with the dates is a character vector.
{H, {Prop}}— Cell array of handles and the destination object's UI properties.Hmust be a scalar or vector andPropmust be a single property character vector or a cell array of property character vectors.
Data Types: char | cell
Holiday dates in calendar, specified using a scalar or vector using a datetime array, string array, date character vectors, or serial date numbers. The corresponding date of the holiday appears Red.
Data Types: double | char | string | datetime
Initial start date when calendar is initialized, specified with date values using a serial date number, datetime array, or date character vector. The values are:
Datenum— Numeric or datetime array date value specifying the initial start date when the calendar is initialized. The default date isTODAY.
Datestr— Date character vector value specifying the initial start date when the calendar is initialized.Datestrmust include a Year, Month, and Day (for example, 01-Jan-2006).
Data Types: double | char | datetime
Format of initial start date (InitDate), specified using a character
vector or datetime.
Data Types: char | datetime
Format of output date, specified using a character vector or datetime.
Data Types: char | datetime
Style for output date, specified using a value of 0, 1, 2,
or 3. The values are:
0— (Default) Returns a single date character vector or a cell array (row) of date character vectors. For example,{'01-Jan-2001, 02-Jan-2001, ...'}.
1— Returns a single date character vector or a cell (column) array of date character vectors. For example,{'01-Jan-2001; 02-Jan-2001; ...'}.
2— Returns a character vector representation of a row vector of datenums. For example,'[732758, 732759, 732760, 732761]'.
3— Returns a character vector representation of a column vector of datenums. For example,'[732758; 732759; 732760; 732761]'.
Data Types: double
Flag for date selection, specified with using a value of 0 or 1.
The values are:
0— Allows multiple date selections.
1— (Default) Allows only a single date selection.
Data Types: logical
Define weekend days, specified using a value of 1 through 7.
Weekend days are marked in red. DayOfWeek can be
a vector containing the following numeric values:
1— Sunday2— Monday3— Tuesday4— Wednesday5— Thursday6— Friday7— Saturday
Also this value can be a vector of length 7 containing
0's and 1's. The value
1 indicates a weekend day. The first element of this
vector corresponds to Sunday. For example, when Saturday and Sunday are weekend
days then WEEKEND = [1 0 0 0 0 0 1].
Data Types: double
Window figure properties, specified with using a character vector with a value of
Normal or Modal. The values are:
Normal— (Default) Standard figure properties.
Modal— Modal figures remain stacked above all normal figures and the MATLAB® Command Window.
Data Types: char
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)