diff --git a/src/FormBuilder.php b/src/FormBuilder.php
index ec1ad70..2e72e02 100755
--- a/src/FormBuilder.php
+++ b/src/FormBuilder.php
@@ -311,6 +311,19 @@ class FormBuilder {
return $this->input('number', $name, $value, $options);
}
+ /**
+ * Create a date input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ * @return string
+ */
+ public function date($name, $value = null, $options = array())
+ {
+ return $this->input('date', $name, $value, $options);
+ }
+
/**
* Create a url input field.
*
diff --git a/tests/FormBuilderTest.php b/tests/FormBuilderTest.php
index d242b3d..54bd589 100644
--- a/tests/FormBuilderTest.php
+++ b/tests/FormBuilderTest.php
@@ -182,6 +182,17 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('', $form3);
}
+ public function testFormDate()
+ {
+ $form1 = $this->formBuilder->date('foo');
+ $form2 = $this->formBuilder->date('foo', '2015-08-20');
+ $form3 = $this->formBuilder->date('foo', null, ['class' => 'span2']);
+
+ $this->assertEquals('', $form1);
+ $this->assertEquals('', $form2);
+ $this->assertEquals('', $form3);
+ }
+
public function testFormFile()
{