def __init__(self):
        super(DatePopupInputPromptExample, self).__init__()

        self.setSpacing(True)

        self._startDate = PopupDateField()
        self._startDate.setInputPrompt('Start date')

        # Set the correct resolution
        self._startDate.setResolution(PopupDateField.RESOLUTION_DAY)

        # Add valuechangelistener
        self._startDate.addListener(self, IValueChangeListener)
        self._startDate.setImmediate(True)

        self.addComponent(self._startDate)
Exemplo n.º 2
0
    def __init__(self):
        super(DatePopupExample, self).__init__()

        self.setSpacing(True)

        self._datetime = PopupDateField('Please select the starting time:')

        # Set the value of the PopupDateField to current date
        self._datetime.setValue(datetime.today())

        # Set the correct resolution
        self._datetime.setResolution(PopupDateField.RESOLUTION_DAY)

        # Add value change listener
        self._datetime.addListener(self, IValueChangeListener)
        self._datetime.setImmediate(True)

        self.addComponent(self._datetime)