Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would you do a clickable calendar in Mathematica?

Has anyone already thought about how to do a clickable calendar in Mathematica? There seems to be something here http://library.wolfram.com/infocenter/Demos/108/, but I quickly tested it and it doesn't seem to work.

like image 399
faysou Avatar asked Nov 15 '11 10:11

faysou


2 Answers

The link you provided seems to work, at least partially.

After loading the notebook from the WR site, scanning, applying all the automatically generated suggestions and evaluating it, the following code:

CellPrint[
 Cell[BoxData[
   GridBox[{{ButtonBox["January 2003", 
       Background -> RGBColor[0.4, 0, 0.4], 
       ButtonFunction -> Null]}, {GridBox[
       Prepend[monthlayout[1, 2003] /. 
         i : (_Integer | _String) :> 
          ButtonBox[i, Background -> RGBColor[1, 0.6, 0.8], 
           ButtonFunction -> (FrontEndToken["New"] &)], 
        alldays /. 
         s_String :> 
          ButtonBox[s, Background -> RGBColor[0.8, 0.2, 0.6], 
           ButtonFunction -> Null]]]}}]], "Output"]]

displays a clickable calendar that opens a new notebook when you click on any day button

enter image description here

like image 191
Dr. belisarius Avatar answered Nov 20 '22 03:11

Dr. belisarius


Here's a slightly more elaborate example:

http://dev.ragfield.com/2009/03/flickcalendar.html

like image 27
ragfield Avatar answered Nov 20 '22 03:11

ragfield