lubieniebieski / bootstrap-datetimepicker-rails Goto Github PK
View Code? Open in Web Editor NEWbootstrap-datetimepicker's JavaScripts & stylesheets for Rails 3.1+ asset pipeline
License: MIT License
bootstrap-datetimepicker's JavaScripts & stylesheets for Rails 3.1+ asset pipeline
License: MIT License
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:
Let me know what you think, it would be great to have bootstrap-datetimepicker-rails on board! 😄
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";
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.
Is there an option to show date picker and time picker at the same time (instead of having to switch between them)?
Thanks.
please make compatible with latest bootstrap 3 and it's glyphicons http://getbootstrap.com/components/#glyphicons
thank you
We have this issue with simple_Form:
Could you help us solve this please?.
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
when toggled, the first
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
then when toggles, these classes toggle back and forth.
Am I missing something here? or is there an issue?
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:
any idea how to solve that?
How to disable the preview dates
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?
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.
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…
Thanks a lot, this really came at the perfect time for our project! :)
Is there an option to display monday first (instead of sunday)?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.