[solved] Usage of datepicker

Hi, I recently started to develop a little app where I want to integrate a date and/ or datetimepicker. I found in the core that jquery datepicker is used. When I try to use it by applying the class=“datepicker” to an input field nothing happens and when I copy the jquery files into my apps js folder and try to load them, I get the message $.browser is undefined in my console log.

What am I doing wrong?

Andy

Why is this solved, can you provide an answer?

Sure I can provide the answer. Just put the following into your code:
JS
$( "#start" ).datepicker();

HTML
<input type="text" name="startdate" id="startdate" />

Options and methods can be found at the jquery homepage http://api.jqueryui.com/datepicker/.

With this sample the datepicker is displayed with the style of owncloud. If you wish to apply your own stlye to the datepicker just copy the file core/vendor/jquery-ui/themes/base/jquery-ui.css into your apps css Folder and do the modifications you like.

Andy

1 Like