mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Display placeholder for date filter (#5767)
* Display placeholder for date filter * CHANGELOG Update (#5767) Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
parent
b5aaebcb2f
commit
7b5c9b7b22
@ -13,5 +13,7 @@
|
||||
- Enh #5598: Added `cy` Welsh language
|
||||
- Fix #5338: Content topic/visibility changes are re-indexed in search index
|
||||
- Enh #5535: Invisible users
|
||||
- Enh #5747: Switch Mailer Library to `Symfony Mailer`
|
||||
- Enh #5767: Display placeholder for date filter
|
||||
- Enh #5747: Switch Mailer Library to `Symfony Mailer`
|
||||
- Fix #5765: Fix rendering content form on external modules
|
||||
|
@ -8,9 +8,10 @@
|
||||
|
||||
namespace humhub\modules\ui\filter\widgets;
|
||||
|
||||
use DateTime;
|
||||
use humhub\modules\ui\form\widgets\DatePicker;
|
||||
use Yii;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use yii\helpers\FormatConverter;
|
||||
|
||||
class DatePickerFilterInput extends FilterInput
|
||||
{
|
||||
@ -36,6 +37,11 @@ class DatePickerFilterInput extends FilterInput
|
||||
{
|
||||
$filter = Yii::$app->request->get($this->category);
|
||||
$this->value = $filter;
|
||||
|
||||
if (!isset($this->options['placeholder'])) {
|
||||
$this->options['placeholder'] = (new DateTime())
|
||||
->format(FormatConverter::convertDateIcuToPhp(Yii::$app->formatter->dateInputFormat));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user