Skip to content

Commit cef0151

Browse files
committed
Style the date picker field for more consistency
1 parent 2e2479e commit cef0151

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

adm/style/manage_ads.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ <h3>{{ lang('WARNING') }}</h3>
130130
</dl>
131131
<dl>
132132
<dt><label for="ad_start_date">{{ lang('AD_START_DATE') ~ lang('COLON') }}</label><br /><span>{{ lang('AD_START_DATE_EXPLAIN') }}</span></dt>
133-
<dd><input class="text" id="ad_start_date" name="ad_start_date" type="date" value="{{ AD_START_DATE ? AD_START_DATE|date(constant('\\phpbb\\ads\\ext::DATE_FORMAT'), 'UTC') }}" size="20" maxlength="20" /></dd>
133+
<dd><input class="phpbb-ads-datepicker" id="ad_start_date" name="ad_start_date" type="date" value="{{ AD_START_DATE ? AD_START_DATE|date(constant('\\phpbb\\ads\\ext::DATE_FORMAT'), 'UTC') }}" size="20" maxlength="20" /></dd>
134134
</dl>
135135
<dl>
136136
<dt><label for="ad_end_date">{{ lang('AD_END_DATE') ~ lang('COLON') }}</label><br /><span>{{ lang('AD_END_DATE_EXPLAIN') }}</span></dt>
137-
<dd><input class="text" id="ad_end_date" name="ad_end_date" type="date" value="{{ AD_END_DATE ? AD_END_DATE|date(constant('\\phpbb\\ads\\ext::DATE_FORMAT'), 'UTC') }}" size="20" maxlength="20" /></dd>
137+
<dd><input class="phpbb-ads-datepicker" id="ad_end_date" name="ad_end_date" type="date" value="{{ AD_END_DATE ? AD_END_DATE|date(constant('\\phpbb\\ads\\ext::DATE_FORMAT'), 'UTC') }}" size="20" maxlength="20" /></dd>
138138
</dl>
139139
<dl>
140140
<dt><label for="ad_groups">{{ lang('HIDE_GROUPS') ~ lang('COLON') }}</label><br /><span>{{ lang('HIDE_GROUPS_EXPLAIN') }}</span></dt>

styles/all/theme/phpbbads.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,37 @@
7878
.phpbb-ads-button:active {
7979
background: #c3c3c3;
8080
}
81+
82+
/* Modern Date Picker Styling */
83+
.phpbb-ads-datepicker {
84+
font-size: 13px;
85+
background: #ffffff;
86+
border: 2px solid #e1e1e1;
87+
border-radius: 6px;
88+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
89+
color: #333333;
90+
width: 180px;
91+
padding: 8px 12px;
92+
}
93+
94+
.phpbb-ads-datepicker:focus,
95+
.phpbb-ads-datepicker:hover {
96+
border: 2px solid #5c7099 !important;
97+
}
98+
99+
.phpbb-ads-datepicker:focus {
100+
outline: none;
101+
}
102+
103+
.phpbb-ads-datepicker::-webkit-calendar-picker-indicator {
104+
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%235C7099" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat center;
105+
background-size: 14px 14px;
106+
opacity: 0.7;
107+
width: 14px;
108+
height: 14px;
109+
cursor: pointer;
110+
}
111+
112+
.phpbb-ads-datepicker::-webkit-calendar-picker-indicator:hover {
113+
opacity: 1;
114+
}

0 commit comments

Comments
 (0)