implement valid week string

This commit is contained in:
tigercosmos 2017-12-14 21:23:06 +08:00
parent b93579a8f0
commit 54c6028033
11 changed files with 103 additions and 128 deletions

View file

@ -1005,6 +1005,12 @@ impl HTMLInputElement {
*textinput.single_line_content_mut() = "".into();
}
}
InputType::Week => {
let mut textinput = self.textinput.borrow_mut();
if !textinput.single_line_content().is_valid_week_string() {
*textinput.single_line_content_mut() = "".into();
}
}
InputType::Color => {
let mut textinput = self.textinput.borrow_mut();