Home | Trees | Indices | Help |
|
---|
|
1 from pyjamas.ui.Calendar import DateField,Calendar 2 from pyjamas.ui.Button import Button 3 from pyjamas.ui.HorizontalPanel import HorizontalPanel 4 from pyjamas.ui.Hyperlink import Hyperlink 5 from pyjamas.ui.SimplePanel import SimplePanel 6 7 from pyjamas.locale import _ 810 11 cancel = _("Cancel") 12 monthsOfYear = [_('Jan'), _('Feb'), _('Mar'), _('Apr'), _('May'), _('Jun'), 13 _('Jul'), _('Aug'), _('Sep'), _('Oct'), _('Nov'), _('Dec')] 14 15 16 204422 bh1 = Hyperlink(_("Current")) 23 bh1.addClickListener(getattr(self, 'onToday')) 24 25 b2 = Button(_("Choose"),self.onMonthSelected) 26 27 bh3 = Hyperlink(self.cancel) 28 bh3.addClickListener(getattr(self, 'onCancel')) 29 30 31 b = HorizontalPanel() 32 b.addStyleName("calendar-shortcuts") 33 b.add(bh1) 34 b.add(b2) 35 b.add(bh3) 36 37 self.vp.add(b)38 40 4143 self.onDate(event,self.currentYear,self.currentMonth,1)46 today_text = _("Current") 475249 super(MonthField,self).__init__(format="%Y-%m") 50 self.calendar = NoDaysCalendar() 51 self.calendar.addSelectedDateListener(getattr(self,"onDateSelected"))
Home | Trees | Indices | Help |
|
---|
http://epydoc.sourceforge.net |