pimutils / pimutils/khal

ikhal: You get stuck in datetime edit textboxes when removing zero-padding

Open
#1,192 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

With the following configured:

[locale]
timeformat = %-H:%M
dateformat = %-d.%-m.%Y
longdateformat = %-d.%-m.%Y
datetimeformat = %-d.%-m.%Y %H:%M
longdatetimeformat = %-d.%-m.%Y %H:%M

You get stuck in these new event "textboxes" when you move over to them:
image

A way out is to use Page Up/Down or clicking with mouse.

Simply a sed 's/%-/%/g' on the example config above fixes the problem but then it shows all dates and times with zero-padding which I don't want (and with the example config formatting in general doesn't seem to be a problem for the TUI as things display just fine)

I think the least we could do is .replace('-', '') where ever the format is checked.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in ikhal with the shown locale configuration and inspect the new-event datetime edit textboxes and their format handling. Done means navigation no longer gets stuck with non-zero-padded formats, while dates and times still display without zero-padding.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.