Does Mathematica have an interactive date input control that lets the user choose a date by browsing to a calendar view and returning the selected date as a date list? For example, something like the Datepicker in jQuery.

There is also some Wolfram examples with date pickers but looks like @rm -rf has delivered :)
–
Mike HoneychurchDec 18 '12 at 20:52

3

I don't know if it is smart about about picking dates, but there is this for finding stable marriages. (Or did you mean to pick dates from trees? That part was ambiguous...)
–
Daniel LichtblauJan 2 '13 at 16:39

3 Answers
3

Date-picker implementation in Mathematica

The following is my implementation of a simple date-picker. The current date is highlighted in LightBlue and the weekends are highlighted in LightGreen. The selected date is always highlighted in LightRed (the default selection is the current date).

You can tap into this calendar by using the Dynamic values for year, month and date for your custom function (a simple example in the last Panel).

Code:

Note that the following implementation uses DayName, which was introduced in version 9. You might have to roll your own if you want to use this in earlier versions of Mathematica.

No month rules, leap year stuff and data necessary if you just use DatePlus[date, {{1, "Month"}, {-1, "Day"}}][[3]], with date the first of the month you're interested in.
–
Sjoerd C. de VriesDec 20 '12 at 22:50

The appearance and functionality is inspired by Developer`DateSetter[], pointed out to me by @WReach. That function is not documented, and it crashes my front end session quite reliably.
–
JxBJan 2 '13 at 9:33

I think that you forgot to include the monthDates definition.
–
Gustavo DelfinoJan 2 '13 at 17:56

@GustavoDelfino It's there right after the Clear[monthDates].
–
JxBJan 2 '13 at 18:36

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.