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(2006, 4, 20)

window.add(dateeditor)

window.show_all()

gtk.main()
      

Properties

Name Access Description
"year" Read/Write Current year.
"month" Read/Write Current month.
"day" Read/Write Current day.
"min-year" Read/Write Minimum valid year.
"max-year" Read/Write Maximum valid year.

Constructor

Creates a new hildon.DateEditor widget.

hildon.DateEditor(year, month, day, min-year, max-year)
year (optional) A year.
month (optional) A month.
day (optional) A day.
min-year (optional) The minimum allowable year.
min-year (optional) The maximum allowable year.
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