quitegreensky / akivymd

A set of fancy widgets for KivyMD
MIT License
40 stars 9 forks source link

Problem with datepicker #4

Closed Matan22g closed 4 years ago

Matan22g commented 4 years ago

if the user select only 2 options (month/year) it will result in error. a fix can be in _choose function:

instead of:

    try:
        date = datetime(
            int(self._year_title),
            int(self._month_title),
            int(self._day_title)
        )
    except:
        self.cancel()
        self.callback(False)

    self.callback(date)
    self.cancel()

something like that:

    try:
        date = datetime(
            int(self._year_title),
            int(self._month_title),
            int(self._day_title)
        )
        self.callback(date)
        self.cancel()
    except:
        self.cancel()
        self.callback(False)
quitegreensky commented 4 years ago

Thanks for reporting this bug.

kentang2017 commented 3 years ago

is it possible to make a datetime picker? i want to add an hour picker widget

quitegreensky commented 3 years ago

@kentang2017 there is not such feature yet