Skip to content

DatetimeTag

mininterface.tag.DatetimeTag

Datetime, date and time types are supported.

from datetime import datetime
from dataclasses import dataclass
from mininterface import run

@dataclass
class Env:
    my_date: datetime

m = run(Env)

The arrows change the day (or the datetime part the keyboard caret is currently editing).

Datetime

In this code, we want only the date part.

from datetime import date
from dataclasses import dataclass
from mininterface import run

@dataclass
class Env:
    my_date: date

m = run(Env)

After clicking the button (or hitting Ctrl+Shift+C), a calendar appear.

Date with calendar

date: bool = False

The date part is active. True for datetime and date.

time: bool = False

The time part is active. True for datetime and time.

full_precision: bool = False

Include full time precison, seconds, microseconds.