Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DatePicker regression with first and last dates #4661

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions sdk/python/packages/flet/src/flet/core/date_picker.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from datetime import date, datetime
from datetime import datetime
from enum import Enum
from typing import Any, Optional, Union

from flet.core.badge import BadgeValue
from flet.core.control import Control, OptionalNumber
from flet.core.control_event import ControlEvent
from flet.core.event_handler import EventHandler
Expand Down Expand Up @@ -94,8 +93,8 @@ def __init__(
self,
open: bool = False,
value: Optional[DateTimeValue] = None,
first_date: DateTimeValue = datetime(year=2050, month=1, day=1),
last_date: DateTimeValue = datetime(year=1900, month=1, day=1),
first_date: DateTimeValue = datetime(year=1900, month=1, day=1),
last_date: DateTimeValue = datetime(year=2050, month=1, day=1),
current_date: DateTimeValue = datetime.now(),
keyboard_type: Optional[KeyboardType] = None,
date_picker_mode: Optional[DatePickerMode] = None,
Expand Down