jQuery UI Support

‹ Back

jQuery UI is not supported out of the box in Ornament, however it is easy to add. Follow these steps:

Add the jQuery UI gem (then bundle and restart your server):

gem 'jquery-ui-rails'

Add the jQuery UI imports to core.js:

//= require jquery-ui/core
//= require jquery-ui/datepicker
//= require jquery-ui-timepicker-addon

Add the jQuery UI imports to core.scss, along with the ornament jQuery UI theme:

@import "jquery-ui/core";
@import "jquery-ui/datepicker";
@import "ornament/jquery-ui-theme";

Finally, enable jQuery UI support in form-datepicker.js:

enabled: true

You can check for jQuery UI support at any time by executing the following in your console:

Ornament.C.FormDatepicker.enabled