I want to get two dates from a calendar.
matlab functio is
c = calendar
or
dates = calendar;
dates(~any(dates,2),:) = [];
fh = figure;
uh = uitable('parent',fh,'data',dates,'ColumnWidth',repmat({20},1,7),...
'ColumnName',{'S','M','T','W','T','F','S'});
but how to get these two dates clicked by user.
Create a callback function:
and add into uitable() arguments:
uitable(..., 'CellSelectionCallback', @cell_select_callback).When pressed, cell_select_callback will print the coordinates of the click and the date, for example:
cell_select_callback(): click at [2 3] on 04-Dec-2012