diff --git a/src/vaadin-time-picker.html b/src/vaadin-time-picker.html
index 3c51d3a..65d24b0 100644
--- a/src/vaadin-time-picker.html
+++ b/src/vaadin-time-picker.html
@@ -218,7 +218,8 @@
*/
readonly: {
type: Boolean,
- value: false
+ value: false,
+ reflectToAttribute: true
},
/**
diff --git a/test/input-test.html b/test/input-test.html
index 564bbf3..ea74075 100644
--- a/test/input-test.html
+++ b/test/input-test.html
@@ -205,6 +205,11 @@
});
});
+ it('should reflect to attribute when readonly property is set', () => {
+ timePicker.readonly = true;
+ expect(timePicker.hasAttribute('readonly')).to.be.true;
+ });
+
describe('aria', () => {
it('text-field should have the `aria-label` attribute', () => {
expect(timePicker.__inputElement.hasAttribute('aria-label')).to.be.false;