GithubHelp home page GithubHelp logo

lubieniebieski / bootstrap-datetimepicker-rails Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 35.0 245 KB

bootstrap-datetimepicker's JavaScripts & stylesheets for Rails 3.1+ asset pipeline

License: MIT License

Ruby 100.00%

bootstrap-datetimepicker-rails's People

Contributors

lubieniebieski avatar tiagoamaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bootstrap-datetimepicker-rails's Issues

Join the Bootstrap-Ruby organisation!

Hi @lubieniebieski,

I have set up the Bootstrap-Ruby organisation a while ago to foster a curated collection of tools for using Bootstrap in Ruby projects: https://github.com/bootstrap-ruby/

I think this project would be a great candidate to join our organisation!

IMO the advantages would be:

  • encourage contributions from other developers when this project is in a repo dedicated to Ruby Bootstrap projects
  • easier to find this project for Rubyists looking to use Bootstrap in their projects

Let me know what you think, it would be great to have bootstrap-datetimepicker-rails on board! 😄

basic documentation?

would have saved me the time it took to link hop trying to install this

add to your application.js

//= require bootstrap-datetimepicker

import the css add to your application.css

ex: in bootstrap_and_overrides.css.scss

@import "bootstrap";
body { padding-top: 60px; }
@import "bootstrap-responsive";
@import "bootstrap-datetimepicker";

defaults preventing data attributes from being assigned

It looks like when you specify a data-date-startdate attribute, it is not read because the logic in the code says to

this.setStartDate(options.startDate || this.$element.data('date-startdate'));

but the options are defaulted as

$.fn.datetimepicker.defaults = {
  maskInput: false,
  pickDate: true,
  pickTime: true,
  pick12HourFormat: false,
  pickSeconds: true,
  startDate: -Infinity,
  endDate: Infinity,
  collapse: true
};

and -Infinity is true, so the rest of the expression is not evaluated.

Widget Toggle between date and time

I have loaded the gem and I have set up the date time modal. When I click on the calendar icon on the right of the input box the date modal appears. At the bottom is the time icon, which when clicked, will reveal the time modal with a calendar icon at the top in which to switch back to the calendar. This is the way the javascript works on the original linked site. However, I cannot get this action to work. I am running rails 4. I did look the code over and when I change
#976 var expanded = $parent.find('.collapse.in');

&& line
#1162 '<li' + (collapse ? ' class="collapse in"' : '') + '>' +

to
#976 var expanded = $parent.find('.in');
#1162 '<li' + (collapse ? ' class="in"' : '') + '>' +

the toggle will then work 4.0.

I also notice that when I open the modal window, the first

  • has class='collapse in'
    and the second
  • has class='collapse'

    when toggled, the first

  • changes to class='collapse'
    and the second
  • changes to just class='in'

    Then the calendar toggle will no longer work. If you change the line, like I suggest above, the toggle will then work, and work like this...

    first

  • begins with class='in' and displays,
    second
  • begins with class='collapse' and is hidden,

    then when toggles, these classes toggle back and forth.

    Am I missing something here? or is there an issue?

  • date is not inserted into textbox by datepicker

    i am trying to add datepicker to my web page using ruby on rails. i got the calendar displayed when i click in the textbox but when i choose a date its not inserted in the textbox.

    this is the textbox view:

    <%= label_tag :"availability" %>
    <%= text_field_tag :availability , @current_user.availability %> i already added confijurations to application.js and applications.css and views/layout/application.html.erb.

    any idea how to solve that?

    Datetime picker with cocoon

    I am trying to use cocoon for some nasted obejct creation, I wanted to use the datetime picker as well for it

    however, I struggle to make newly created datetime in the form triggle the datetime picker, any helps?

    Disable seconds?

    Is there a way to disable seconds in the picker? I removed ss from the data-format value, but this only hides it in the input field, not in the picker itself.

    autoclose feature

    I'm wondering how to make an autoclose behavior like bootstrap-datepicker has…?
    i have use cases where no time pick needed so it will be more friendly if it'll close automatically on date select…

    bootstrap.less wasn't found

    I used the twitter-bootstrap-rails gem and don't have a bootstrap_and_override.scss but a bootstrap_and_overrides.css.less file. When I tried to put
    @import 'bootstrap';
    @import 'bootstrap-datetimepicker';
    into that file, it resulted in an error that said bootstrap.less wasn't found and bootstrap-datetimepicker.less wasn't found.
    How do I fix this issue?

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.