A
A
Alexey2014-12-09 14:13:31
JavaScript
Alexey, 2014-12-09 14:13:31

Calendar in input tag?

Faced a not good situation when the datepicker does not work as it should, namely:
1) I have Bootstrap3, Jquery, Jquery-UI - that's all I can use. And also given 2 input fields on the page and 2 input fields in the modal window.
2) I can’t display at least a copy of the code on JsFiddle, because there is a lot of code and, unfortunately, “subscription”
3) When I insert the code into the page like this:

<input type="text" class="datepicker_goal" value="Period"/>
$('.datepicker_goal').datepicker();

2 inputs are dynamically formed and everything works. When I click, I see a calendar.
But the same thing does not work in a modal window:
<input type="text" class="datepicker_goal_modal" value="Period"/>
$('.datepicker_goal_modal').datepicker();

Nothing is displayed. Moreover, an element with the .datepicker class is not even created. And after clicking on the inputs, this line starts to run:
$('body').on('hide.bs.modal', '.modal', function (event) {

Although I didn't hide anything...
I tried to assign an event to the document, changed the z-index, even tried like this: Alas... In a modal window, the datepicker doesn't work. Then I decided to somehow replace it (I write not in the modal window): But when you click on the icon for calling the drop-down menu with a date selection, nothing happens either. As if they had agreed ... (The question is, how to implement the datepicker output on the main page and in the modal window using the above technologies?
.datepicker{z-index:1151 !important;}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
My joy, 2014-12-09
@t-alexashka

$('.datepicker_goal, .datepicker_goal_modal').datepicker();

if so? and at the very bottom of the document, drop

A
Anvar Shakhmaev, 2017-04-06
@RxR

transition
https://jsfiddle.net/rsts3dye/2/

T
toly19, 2017-04-06
@toly19

The site has a separate video without effects + 4 pictures.
There, the transparency of all four images is changed separately.
Regarding transparency depending on the position of the cursor (as I think):
For each picture there is a conditional center of action - the closer the cursor is to it, the less the transparency of the picture.
By moving the cursor, you calculate the distance between two points - the cursor and the conditional center,
and calculate the transparency (interpolation will help you).
skeleton-overlay-system.jpgskeleton-overlay-emotional.jpgskeleton-overlay-cognition.jpgskeleton-overlay-biosocial.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question