Is there any way to disable Bootstrap for date picker? - javascript

I have a date picker made of JavaScript. I don't want it to be affected by Bootstrap. Is there any way to do it? Or I should use a Bootstrap date picker?

I thin you'll need to work around it manually. There are two things:
CSS: if Bootstrap overrides any CSS rules, you need to specify a more specific rule that will take precedence over what Bootstrap does. See here: http://juicystudio.com/article/selector-specificity.php
JS: if any JS affects the control, you'll most probably have to unregister all Bootstrap handlers (use Chrome debugger to see if there are any) and register the ones from datepicker manually.

You can specify own css class for your datepicker and override bootstrap's styles

Related

How can i change the style of default dropdown sorting of products in woocommerce

I was wondering is there any way to change the style of default dropdawn sorting of product(A-z,Sale) in woo-commerce to any other style for eg :Tabs
Not sure how much you need to modify it, but in wordpress you can generally override default styles of any plugin/theme/etc by using a custom CSS plugin. In your browser, inspect the element you want to change to get it's class or id, then make a custom CSS rule to modify it. While many plugins have some level of theme customization functionality, it is normally very limited and probably not enough to match your theme to your plugin very well.

Apply Bootstrap CSS class to all HTML elements of given type

I want to set the Bootstrap btn class to all <button> elements without doing it manually on every button. I know I can add custom style to all buttons like that:
button {
...some-properties...
}
but I would need something like that:
button {
.btn
}
I know I can achieve that with LESS, but my question is, if it is the only method to achieve that or is it possible using only CSS? I have also found that I can achieve that using jQuery. For what it's worth, I am using AngularJS, maybe AngularUI or AngularStrap would help?
No, there's no such thing as extending a css class in pure css. The only way to achieve what you want would be to get the source css of bootstrap .btn class and add it to all buttons:
button {
// .btn source css
}
Even if it works, it's not a good approach since Bootstrap may change it in future versions. Css preprocessors like Less and Sass are probably the best way to do it.
I don't think that there is another way except using Less in this scenario with CSS you cannot do this whatever you do because CSS is not CAPABLE of this LEVEL of Abstraction so Please Use LESS I assure you you cannot do this with CSS so don't waste Time and Use LESS
like this:
button {
.btn; }

Non-Modal/Modeless Dialogs in AngularJS without using jquery-ui

I am trying to create non-modal dialogs in my AngularJS app.
The app uses Bootstrap as well.
I am trying to create a draggable dialog, which remains active while the rest of the background can be interacted with (non-modal definition).
So, far I have played with Bootstrap modal which doesn't fit in with the above requirement.
This library:
https://github.com/jwstadler/angular-jquery-dialog-service
is exactly what I need, with one drawback this uses JQuery-UI (which I can't use, as it is too big)
Any pointers on how to achieve this with least dependencies ?
EDIT (20 August, 2014):
I ended up writing javascript code for the non modal dialogs, all working good as required.
EDIT (28 April, 2015):
Since, I can not post the answer here to my own question. This page should be seen just as findings.
Use Bootbox and set this to disable its modal style:
.bootbox {
overflow:visible;
height:1px;
position:absolute; /* if necessary */
}
Also, you'll have to call this JavaScript code:
$(document).off('focusin.bs.modal'); // disable Bootstrap's anti-focus stuff
$('body').removeClass("modal-open");
If you're using the dialog box just for the purpose of showing some information, not for taking any input,
You can use BootBox : http://bootboxjs.com/
angular-ui modal dialog boxes : http://angular-ui.github.io/bootstrap
Also, an alternative approach could be using block UI. You can design your dialog in the HTML, and show that HTMl in an blocking dialog box using Malsup Block UI..
More Details : http://malsup.com/jquery/block/#dialog
Disclaimer : All of them have some or the other dependency..
You can use Bootstrap and integrate it with AngularJS. It is minimal JS, and based on best practices for CSS and responsive design.

dojo calendar pop-up

How do I implement a dojo datepicker in dojo version 1.8 ?
This should be different from a dojo DateTextBox in the way that a dropdown calendar is displayed on clicking a calendar icon.
You have to looking for dijit/TooltipDialog and require a few of dijit like "dijit/popup", "dijit/Calendar"
or "dijit/form/DropDownButton" ,"dijit/Calendar"
Look at here will easier.
Try "dijit/CalendarLite" and by css and some javascript coding you can make DatePicker different from dijit/form/DateTextBox.

Where can I find a javascript calendar that allows me to disable certain dates?

I'd like to put a calendar on a webpage showing which days a house is availiable to rent. I know that the jquery datepicker has this functionality. However, I can't get it to display correctly
I've tried the jquery date picker, but it seems that I'm missing a stylesheet, as all the headings collapse together. Anyone know where I can find a suitable style sheet?
Alternatively, is there another javascript calendar that gives me this functionality?
I'd quite like to keep the amount hosted on my site at a minimum, as I only need the datepicker, not a bunch of other UI stuff.
You can select only those components, building a custom download, from the jQuery UI that you want (in addition to core) if you want, or you can use Google's AJAX libs to reference the jQuery code, both core and UI code. People using your site may already have it downloaded from there eliminating the need to (re)download it all.
Use the ThemeRoller to generate the appropriate CSS file for the jQuery UI widgets.
As for the functionality that you require, look at using beforeShowDate to provide callback functionality that allows you decide wither a particular date is selectable.
If you don't want to use Themeroller to generate a CSS theme for you, I suppose you could grab the vanilla datepicker CSS straight from the jQuery UI source repository:
http://dev.jqueryui.com/browser/trunk/themes/base/ui.datepicker.css

Categories