Skip to content

add after, before constraint to the datetime #27

Open
@e3rd

Description

@e3rd

I want the datetime input have the after and before constraints.

This code will shows you a datetime dialog:

from mininterface import run
from mininterface.tag import DatetimeTag

m = run()
m.form({"my datetime": DatetimeTag()})

Image

Implement these attributes to the DatetimeTag class. Add there the _validate method that checks these two.

This should be sufficient to make this work:

m.form({"my datetime": DatetimeTag(before=date(2025,5,19))})

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions