# 按日期过滤器的前/后字段与其他字段不对齐

**URL:** https://meta.discourse.org/t/filter-by-date-before-after-field-not-aligned-with-other-fields/366217
**Category:** UX
**Tags:** mobile, search
**Created:** [2025年五月15日 07:38 UTC](https://meta.discourse.org/t/filter-by-date-before-after-field-not-aligned-with-other-fields/366217 "2025-05-15T07:38:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025年五月15日 07:38 UTC](https://meta.discourse.org/t/filter-by-date-before-after-field-not-aligned-with-other-fields/366217/1 "2025-05-15T07:38:06Z")

</div>

用于在特定日期之前或之后排序主题的两个字段不够长，这使得它们与其他字段不对齐。

 ![Discord 搜索界面的截图，其中突出显示了过滤选项，并附有文字“抱歉，我们的 AI 搜索未找到匹配的主题。”（由 AI 题注）](https://global.discourse-cdn.com/meta/original/4X/9/2/a/92a6f69987d39196467dbbf0cb2bc4dbdd092484.jpeg)

左侧和右侧的间隙用紫色表示。

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [2025年五月20日 15:51 UTC](https://meta.discourse.org/t/filter-by-date-before-after-field-not-aligned-with-other-fields/366217/2 "2025-05-20T15:51:25Z")

</div>

这会解决问题的，感谢你的报告！

> <https://github.com/discourse/discourse/pull/32822>
>
> As seen in the advanced search filters... iOS doesn't show placeholders for the …date input, so we have a CSS adjustment for this, but it doesn't clear when a value is present. 
> 
> This update adds a class when a value is present so the placeholder can be cleared. 
> 
> Before:
> !\[image\](https://github.com/user-attachments/assets/37edad10-886b-41d7-b412-b303be351603)
> 
> 
> After:
> !\[image\](https://github.com/user-attachments/assets/fee713ab-09f9-49fb-9fda-96bd72a260e1)
> 
> 
> Also fixed extra left margin by removing a class.
