php – How to make a form with a date field? (DD/MM/YYYY)


I'm new to Kohana and need to make a form with a date field. My form is this:

<?php echo form::select('TURMA_codturma', $TURMA_codturma); ?> <br><br>

<div>Matricula: <?=form::input('ALUNO_MATRICULA' );?></div>
<div>Data: </div>
<?php echo '<div'.HTML::attributes($attrs).'>'.$content.'</div>'; ?>
<?=form::submit('btn_submit', 'Salvar') ?>

How to make a txt field in DD/MM/YYYY format?


I recommend using datepicker + maskedinput. I use maskedinput version 1.3.1 which works on older IE.

Documentation and download links:

The code will look something like this:

<input type="text" id="data />




NOTE: These two plugins will save you time in checking if only numbers were included in the plugin.

Scroll to Top