---
title: Using Inside a Form
order: 6
layout: page
---

[[vaadin-date-picker.value]]
= Using Inside a Form

The [vaadinelement]#vaadin-date-picker# implements the [classname]#IronFormElementBehavior#, so it can be used as a field in an [elementname]#iron-form#.

[source,html]
----
<form is="iron-form" action="">
  <vaadin-date-picker name="date" label="Pick a date"></vaadin-date-picker>
  <input type="submit">
</form>
<script>
  var form = document.querySelector('form');
  var combobox = document.querySelector('vaadin-date-picker');

  form.addEventListener('iron-form-submit', function() {
    alert('Form submitted with date: ' + form.serialize().date);
    return false;
  });
</script>
----
