How to remove bootstrap datepicker? - bootstrap-datepicker

In jQuery UI DatePicker, we are able to dynamically remove the datepicker from the textbox input. (Remove Datepicker Function Dynamically)
Is it possible to do so in Bootstrap datepicker?

Maybe this can do the trick:
showOnFocus
Boolean. Default: true
If false, the datepicker will be prevented from showing when the input field associated with it receives focus.

Related

FullCalender v5 show/hide weekends via toggle button

I know how you can initially show or hide Sat/Sun on the calendar by setting:
weekends: true,
If I use a toggle button what do I call to change it interactively?
Thank you for the document reference #ADyson. Not sure why I didn't see the dynamic options. Didn't need to re-render.
calendar.setOption('weekends', false);

Bootstrap dropdown alignment off after loading dropdown contents dynamically in Blazor

In Blazor, you can load content dynamically by putting it in an #if block and then making that condition true, e.g. on a button click.
I have a Bootstrap dropdown whose contents are loaded when the dropdown is first clicked. For some reason, the right alignment is not honored on the first click of the dropdown button but is on each subsequent click to open it. There is something about the initial render and the CSS not being honored. I am not sure why this is happening.
Here is an example (Blazor server-side): https://blazorfiddle.com/s/yc5m9rv4
Since Bootstrap dropdowns user popper.js, the solution was found through that. Bootstrap provides an update method to refresh the dropdown's position.
To solve this issue, the update method just needed to be called after the dropdown is rendered.
Here is an update, with this solution, to the example in the question: https://blazorfiddle.com/s/t24r1753

JavaFX, Editable DatePicker is not adding seperator in date

I want working with DatePicker. And I want that, editable DatePicker should add separator symbols like / and - itself. Can I do it with any method or attribute in SceneBuilder fxml file.
Here is the Image of my UI
And I want DatePicker should work like this Automatically

clicking label doesn't click checkbox in React?

I have created a form where a user can pick options prior to submitting the form. I am hiding the checkboxes with display: none and am styling the <label> so that when the user clicks the label it triggers the checkbox.
I've got this to work in vanilla HTML and CSS, however when I try this in React, clicking the label doesn't do anything. ONLY if I unhide the checkbox am I able to click on the checkbox and am able to see the label styling. I want to hide the checkbox though.
Does anyone know how to hide the checkbox and still able to click the label in ReactJS?
Here is the codepen of what I am trying to build in ReactJS.
Use htmlFor instead of for in react (see react supported attributes):
<input type="checkbox" id="check3"/> Fish
<label htmlFor="check3"><span class="fa fa-check"/></label>
As it was already stated - use htmlFor and then try adding onClick event on label instead of on an input. This will add/remove checked attribute on the input itself. I assume that you already use defaultChecked attribute on your input.

jQuery to change listbox selection mode

I have an ASP.NET page with a listbox whose selection mode is set to multiple by default. I would like to set its selection mode to single on a button click.
Code snippet of my attempt:
$('#testBtn').click(function(){
$('#testListBox').attr("SelectionMode","Single");
});
It is not working though. What am I doing wrong here and how to get it to work?
cheers
The select box uses the attribute "multiple" to determine if it should allow multiple selections. You can remove it via jQuery using the removeAttr() function:
$('#testListBox').removeAttr('multiple');

Resources