Hi,

There should be validation for Publish Date and Expiry Date. The values in the fields should not be the same.
It's accepting the same values.

Scenario:
Suppose you have set up an event block starts at 4/2/2019 18:45:00 and it will get over at 4/2/2019 18:45:00.
Technically, there must be the time difference. So that user won't keep the same value for start & end date.

Suggestion:
Add validation before block gets submit.

Checked the attached file: block_scheduler.png

Thanks and Regards,
Mayank

Comments

patelmayank7552 created an issue. See original summary.

patelmayank7552’s picture

Status: Needs work » Needs review
StatusFileSize
new723 bytes

Hi,

I have created the patch to fix this issue.

Please review it.

Thanks

sdxt’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new53.6 KB

Hi @patelmayank7552, I have applied the patch and found it working, now user has to enter end date greater than the start date.
Please find the screenshot.

  • geoanders committed f0c6b3a on 2.0.x
    Issue #3030475 by patelmayank7552, sdxt: Validation needed for Publish...
geoanders’s picture

Status: Reviewed & tested by the community » Fixed

Now fixed in 2.0.x branch. I had to adjust the code to make sure we had date values and that the returned value from form state was indeed an object and not an array.

geoanders’s picture

Status: Fixed » Closed (fixed)