Skip to content

Commit

Permalink
Swap day and year
Browse files Browse the repository at this point in the history
  • Loading branch information
Oshawk committed May 18, 2024
1 parent 8791b6b commit 3ff088d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/date_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ impl Component for DateComponent {
fn view(&self, ctx: &Context<Self>) -> Html {
html! {
<div class="field has-addons">
<div class="control" style="flex: 1">
<input class="input" type="text" placeholder="Year" value={ match self.year_value { Some(year) => year.to_string(), None => "".to_string() } } oninput={ ctx.link().callback(|event: InputEvent| Self::Message::YearValue(event.target_unchecked_into::<HtmlInputElement>().value())) } />
</div>
<div class={ if self.season_focus { "dropdown is-active" } else { "dropdown" } } style="flex: 1">
<div class="control is-expanded">
<div class="dropdown-trigger">
Expand All @@ -114,6 +111,9 @@ impl Component for DateComponent {
<div class="control" style="flex: 1">
<input class="input" type="text" placeholder="Day" value={ match self.day_value { Some(day) => day.to_string(), None => "".to_string() } } oninput={ ctx.link().callback(|event: InputEvent| Self::Message::DayValue(event.target_unchecked_into::<HtmlInputElement>().value())) } />
</div>
<div class="control" style="flex: 1">
<input class="input" type="text" placeholder="Year" value={ match self.year_value { Some(year) => year.to_string(), None => "".to_string() } } oninput={ ctx.link().callback(|event: InputEvent| Self::Message::YearValue(event.target_unchecked_into::<HtmlInputElement>().value())) } />
</div>
</div>
}
}
Expand Down

0 comments on commit 3ff088d

Please sign in to comment.