hildon.DateEditor

hildon.DateEditor

A simple widget with three entry fields (day, month, year) and an icon (eventbox). The clicking of that icon opens up a hildon.CalendarPopup.

Description

It's a simple widget with three entry fields (day, month, year) and an icon (eventbox). The clicking of that icon opens up a hildon.CalendarPopup. The current system date is shown in the editor by default.

Ancestry

Up to the first non-hildon ancestor:

...
 +-- gtk.Container
      +-- hildon.DateEditor

Usage Example

import gtk
import hildon

window = hildon.Window()
window.set_title("Test App")

dateeditor = hildon.DateEditor()
dateeditor.set_year(2006)
dateeditor.set_month(4)
dateeditor.set_day(20)

window.add(dateeditor)

window.show_all()

gtk.main()
      

Properties

Name Access Description

Constructor

Creates a new hildon.DateEditor widget.

hildon.DateEditor()
Returns A new hildon.DateEditor widget.

Methods

get_date

This method is used to get the currently selected year, month, and day.

hildon.DateEditor.get_date()
Returns A tuple of the form (year, month, day).

set_date

This method activates a new date on the calendar popup.

hildon.DateEditor.set_date(year, month, day)
year A year
month A month
day A day

get_year

This method is used to get the currently selected year.

hildon.DateEditor.get_year()
Returns The currently selected year.

set_year

This method is used to select the year.

hildon.DateEditor.set_year(year)
year The year to be selected.

get_month

This method is used to get the currently selected month.

hildon.DateEditor.get_month()
Returns The currently selected month.

set_month

This method is used to select the month.

hildon.DateEditor.set_month(month)
month The month to be selected.

get_day

This method is used to get the currently selected day.

hildon.DateEditor.get_day()
Returns The currently selected day.

set_day

This method is used to select the day.

hildon.DateEditor.set_day(day)
day The day to be selected.


Improve this page