pickachu
pickachu copied to clipboard
Datetime picker
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?
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?
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.