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

Datetime picker #11

Open
akrejczinger opened this issue Apr 7, 2020 · 2 comments
Open

Datetime picker #11

akrejczinger opened this issue Apr 7, 2020 · 2 comments

Comments

@akrejczinger
Copy link

As far as I can tell, currently only dates can be selected, datetimes are not possible.
This makes the hour, minute, seconds etc. formatting options useless.
Am I missing something? Could this be added?

@akrejczinger
Copy link
Author

After some further google search it seems Zenity doesn't support this, so it may be harder than I thought. Is there an alternative library to Zenity with a good datetime picker?

@DougBeney
Copy link
Owner

You can check out apps.py and add your own custom datetime picker app. Pretty easy to add a new, custom app.

Ex.

'datetime': {
    'cmd': 'python',
    'options': [
        '-c "import datetime; print(datetime.datetime.now())"',
    ]
}

..prints the current datetime.

OR

'datetime': {
    'cmd': 'python /path/to/my-datetime-picker.py',
    'options': [
    ]
},

..runs your own custom script to do whatever and print a datetime.

Your challenge would be figuring out how to display a GUI datetime dialog. Without installing any sort of additional Python packages, you may be able to achieve this in Tkinter. If you want a Gtk GUI, there's a Python library for that. Same for Qt. I think it would be easiest with Qt. Example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants