Date Picker Cocoa

Update 4.28.2012

Added a feature request to be able to set the calendar to a particular date.

The API is to set the calendar to a specific date, Pass Year, Month, Day, Hour, Minute, Second. This is for GMT time.

Me.SetDateFromComponents 1985, 7, 5, 12, 20, 10

****************************

Cocoa comes with a nifty calendar and clock option. If you want to add a simple display of this information in your Mac Cocoa App, you might want to give this module and class a try. It’s very easy to use with only a few lines of code required. This project wraps this functionality up for you. It is encrypted and free to use.

The above screen shot of the included project is using five custom canvas classes. I added the ability to have the clock animate if you want.

Download Project Here …..

About bigdaddytom

Hobbyist programmer, self taught, started with Rb in 1999. Xcode, Objective-C iPhone coder too. I have been blessed being able to live in Hawaii for over three decades. Proud father of two. Business owner. The above image is from atop Mauna Kea looking towards Mauna Loa on the big Island of Hawaii.
This entry was posted in Code. Bookmark the permalink.

3 Responses to Date Picker Cocoa

  1. lucio says:

    hi, there is a way to initialize the calendar with a custom date ? (not a Todaydate)
    Thanks in advances

  2. devulder says:

    hi,
    doesn’t compile with RS 2012 !

    message error:

    Code, frmCalcu.NSDatePickerTJC1.Open, line 2, This item does not exist, Me.InitializeStyle NSDatePickerTJC.NSClockAndCalendarDatePickerStyle // InitializeStyle MUST be called first

  3. bigdaddytom says:

    The download project runs fine for me with no errors. RS 2012R.2 Mac 10.8.2

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>