Problem/Motivation

Same issue related here https://www.drupal.org/project/single_datetime/issues/2982299. Issue was closed in that ticket but never addressed.
Whether using optional end date module or using the feature added in drupal 9.3x dev (https://www.drupal.org/project/drupal/issues/2794481) the validation in validateSingleDateTime() does not allow you to submit the form when selecting a future start date and no end date.

Steps to reproduce

Set up daterange field and simple date range field display and have optional end date select (by either method above). Select a future start date and no end date and submit form. You will be prompted with the follow error:

'The @title end date cannot be before the start date'

Proposed resolution

Check if end date submitted is null or blank and skip this validation check.

Remaining tasks

Create/submit patch

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

billdaff created an issue. See original summary.

billdaff’s picture

I believe this should address this issue, worked for me on 1.8.0-beta1

billdaff’s picture

Status: Active » Needs review

keshav.k made their first commit to this issue’s fork.

keshavv’s picture

Status: Needs review » Reviewed & tested by the community

Test patch and confirmed its working good. Created MR for the same for easy merge. +1 for RTBC

jcnventura’s picture

Status: Reviewed & tested by the community » Needs work

Tried this with the "Optional End Date" module, and the patch didn't work. This should support both options, or wait until #2794481: Allow end date to be optional is merged.