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

Make the end-time selection empty if not used #23

Closed
mpitz opened this issue Feb 3, 2018 · 8 comments
Closed

Make the end-time selection empty if not used #23

mpitz opened this issue Feb 3, 2018 · 8 comments
Assignees
Labels
Milestone

Comments

@mpitz
Copy link

mpitz commented Feb 3, 2018

While you can leave the end-date empty you have to set a end-time to leave it open. This is confusing and not consequent. I suggest to leave the end-time empty too if it is not used!

image

If you change the start-time you every time have to set the end-time again if you want to leave it open!

@mpitz mpitz changed the title Make the end-time selection unused if not set Make the end-time selection empty if not set Feb 3, 2018
@mpitz mpitz changed the title Make the end-time selection empty if not set Make the end-time selection empty if not used Feb 3, 2018
@leofeyer
Copy link
Member

I doubt that this is possible, because tl_calendar_events.endTime cannot be empty.

@Aybee
Copy link

Aybee commented Feb 21, 2018

Why can this not be empty? Can't you check: if empty than equal starttime, if you need it within your logic?

@leofeyer
Copy link
Member

It's because tl_calendar.startTime and tl_calendar.endTime are the two main fields that store the calculated start and end time (e.g. see here). And the end time cannot be null.

@Aybee
Copy link

Aybee commented Mar 19, 2018

And the end time cannot be null.

As your query does not work with NULL?

@mpitz I've this in my dcaconfig

/** Events */
// Set endtime default to empty
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['endTime']['default'] = NULL;

With this setting, the End time is not set automatically when you activate Add time. So you can change the automatically set Start time and if you leave the field End time empty it gets filled with your Start time when you save the event.

BTW, why gets the Start time filled with the current time? I think this will not happen, that we want the Start time to be the current time.

@leofeyer
Copy link
Member

So you can change the automatically set Start time and if you leave the field End time empty it gets filled with your Start time when you save the event.

But that's not what @mpitz wants. He wants the field to remain blank for open end events.

@mpitz
Copy link
Author

mpitz commented May 17, 2018

But that's not what @mpitz wants. He wants the field to remain blank for open end even

Right, that's not what I suggested. It is annoying and error prone if you have the set the End time again if you want to leave it open, after you've changed the Start time.

@leofeyer
Copy link
Member

Implemented in 5629a7d. It was surprisingly simple. 😄

@Aybee
Copy link

Aybee commented Jul 10, 2018

Wow. Thank you. 👍 🥇 💯

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

No branches or pull requests

3 participants