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

Feature/#1452 time jump #2180

Closed
wants to merge 9 commits into from
Closed

Conversation

Tryxns
Copy link
Contributor

@Tryxns Tryxns commented Oct 29, 2024

This PR is to resolves #1452.
VERY related to #848: both should share the same code and API.

Sample (Timepicker):

from datetime import datetime
from taipy.gui import Gui

time = datetime.today()

page = "<|{time}|time|minute_jump=15|>"

if __name__ == "__main__":
    Gui(page).run(title="Time - Minute Jump")

Screenshot 2024-10-29 at 17-21-39 Time - Simple

Sample (Datepicker):

import datetime
from taipy.gui import Gui

date = datetime.datetime.today()

page = "<|{date}|date|with_time|minute_jump=15|>"

if __name__ == "__main__":
    Gui(page).run(title="Date - Minute Jump")

Screenshot 2024-10-29 at 17-24-15 Date Range - Simple

Sample (DateRangepicker):

import datetime
from taipy.gui import Gui

start_date = datetime.date(1756, 1, 27)
end_date   = datetime.date(1791, 12, 5)
dates = [start_date, end_date]

page = "<|{dates}|date_range|with_time|minute_jump=15|>"

if __name__ == "__main__":
    Gui(page).run(title="Date Range - Minute Jump")

Screenshot 2024-10-29 at 17-25-49 Date Range - Simple

Bonus, u even can make the minutes jump with different value!

Sample every 10 minutes
Screenshot 2024-10-29 at 17-42-57 Time - Simple

Sample every 6 minutes
Screenshot 2024-10-29 at 17-44-15 Time - Simple

@Tryxns
Copy link
Contributor Author

Tryxns commented Oct 29, 2024

ready for your review @FredLL-Avaiga

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tx @Tryxns Excellent job
Everything is there (except the viselemnts .json)

But I really think this should be manage in conjunction with #2165
What do you think @FabienLelaquais ?

@Tryxns
Copy link
Contributor Author

Tryxns commented Oct 29, 2024

Ok, will update viselements.json in minutes!

May I know what's the difference between viselements.json and factory.py when we updating the component property?

@FredLL-Avaiga
Copy link
Member

Ok, will update viselements.json in minutes!
👍 but the main point is that we're not even sure that this should be handled independently of the other issue/PR!

May I know what's the difference between viselements.json and factory.py when we updating the component property?
viselements.json is used to generate the doc, class definition for builder and completion/help in VS code via Taipy Studio

@Tryxns
Copy link
Contributor Author

Tryxns commented Oct 29, 2024

Thanks @FredLL-Avaiga 💡 a fundamental & important lesson in Taipy framework to know the their function
Done updating viselements.json. Looking forward for the decision about this issue & issue 2165 @FabienLelaquais @FredLL-Avaiga

@FabienLelaquais
Copy link
Member

tx @Tryxns Excellent job Everything is there (except the viselemnts .json)

But I really think this should be manage in conjunction with #2165 What do you think @FabienLelaquais ?

You are, as always, completely right @FredLL-Avaiga.
This PR is great... but the issue was not specified enough, and yes, it is completely related to #848 as @FlorianJacta mentioned.

I will therefore close the PR, not merging it, yet keeping the code for future integration in both date and time pickers.

The 200 points will be allocated to you no matter what, @Tryxns.
Thanks a lot for your contribution.

@FabienLelaquais
Copy link
Member

As promised

@RymMichaut
Copy link
Member

Congratulations for this closed PR.
@Tryxns you'll get your reward all along with the other two packages :)

@Tryxns
Copy link
Contributor Author

Tryxns commented Oct 30, 2024

merci Rym, Fabien, & Fred 🙌

@Tryxns
Copy link
Contributor Author

Tryxns commented Oct 30, 2024

@quest-bot loot #1452

@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 30, 2024
@quest-bot quest-bot bot mentioned this pull request Oct 30, 2024
2 tasks
Copy link

quest-bot bot commented Oct 30, 2024

Quest PR submitted! image Quest PR submitted!

@Tryxns, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a validation for date with_time
4 participants