jQuery Datepicker showAnim not animating

和自甴很熟 提交于 2019-12-20 06:37:16

问题


I've tried numerous ways and scoured the internet to try and make Animations work and have drawn a blank. I have the datepicker working and date format option but not animations (I'm looking to use the 'clip' option).

Here's what's in the various files:

Application.js

//= require jquery
//= require jquery.turbolinks
//= require jquery-ui/datepicker
//= require jquery_ujs
//= require turbolinks
//= require_tree .

Events.js.coffee

jQuery ->
  $("#datepicker").datepicker(
    dateFormat: "DD, d MM, yy"
  );

_form.html.erb

<%= f.input :image, as: :file, label: 'Image' %>
<%= f.input :title, label: 'Title' %>
<%= f.input :location, label: 'Location' %>
<%= f.text_field :date, id: 'datepicker', label: 'Date' %>
<%= f.input :time, label: 'Time' %>
<%= f.input :description, label: 'Description' %>
<%= f.input :organised_by, label: 'Organised by' %>
<%= f.input :organiser_description, label: 'Organiser description' %>
<%= f.input :url, label: "Link to Organiser site" %>

<%= f.button :submit, label: 'Submit' %>

Application.css.scss

/*
 *= require_self
 *= require jquery-ui/datepicker
 */

@import 'normalize';
@import 'global.css.scss';
@import 'events.css.scss';
@import 'welcome.css.scss';

I've tried the following variations:

$ ->
  $("#datepicker").datepicker();
  $("#datepicker").datepicker("option", "showAnim", "clip");

  $(document).ready(function(){
    $("#datepicker").datepicker(dateFormat: "DD, d MM, yy");
    $("#datepicker").datepicker("option", "showAnim", "clip");
  });

What am I missing? It's such a minor issue in the grand scheme of what I'm building, but I won't move on until this is fixed. All assistance much appreciated.

来源:https://stackoverflow.com/questions/36352398/jquery-datepicker-showanim-not-animating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!