craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.27k stars 635 forks source link

[4.x]: Date Range Conditionals don't include the 'To:' date #13435

Closed tommysvr closed 9 months ago

tommysvr commented 1 year ago

What happened?

Description

When using Conditional Date Range filters, ‘From:’ is >= but ‘To:’ is < so a check for entries until today doesn’t include entries created today.

Steps to reproduce

  1. Create a new entry
  2. Set a Date Created / Post Date filter with a Range from any date until today's date

Expected behavior

The newly created entry will show in the filtered results.

Actual behavior

The new entry will not show (entries matching the 'To:' date will not show)

screenshot_2023_07_17 _12 11

Craft CMS version

4.4.15

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

-

MatthewBUK commented 1 year ago

Hi @tommysvr ,

Just adding those missing items.

PHP version 8.1.5

Operating system and version Ubuntu 18.04.6 LTS / Linux 4.15.0-163-generic

Database type and version MySQL 5.7.36

Image driver and version Imagick 3.5.1 (ImageMagick 6.9.7-4)

Installed plugins and versions Article Editor | v2.0.1 Code Field | 4.0.9 Colour Swatches | 4.3.0 Control Panel CSS | 2.6.0 Control Panel JS | 2.6.0 Craftagram | 2.0.2 Icon Picker | 2.0.13 Navigation | 2.0.19 Neo | 3.8.2 Redactor | 3.0.4 SEOmatic | 4.0.28

brandonkelly commented 9 months ago

Craft 4.6.0 is out now, with a change to date range condition rules, so that they are now inclusive of their end dates.