jquery-ui-datepicker

Datepicker in jquery mobile is duplicate when is added in a second page

自闭症网瘾萝莉.ら 提交于 2019-12-01 02:07:32
问题 I'm needing some help with the datepicker use in mobile app. I'm using the jQuery UI datepicker in my app. But the datepicker is show twice (duplicate) when I put it in the second page. However when I put the datepicker in the first page, is shown ok. This is an example, if you run it you can see that the datepicker is duplicate in second page. <!DOCTYPE html> <html> <head> <title>Datepicker Test</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min

How to constrain min and max dates for jQuery-ui datepicker based on another date

纵然是瞬间 提交于 2019-12-01 01:56:09
I would like to know how can we set the check-out date between the check-in date. Like if we select the month of June (when current month is February) and the 15th day. So it gives the authority to select the day between 30 days(30 limit). So the end date would be: 15 July. Here we have a code: <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/black-tie/jquery-ui.css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com

Datepicker dynamic min / max dates

怎甘沉沦 提交于 2019-12-01 00:43:15
I'm using the jQuery datepicker plugin on a site I am building. I need users to be able to pick two dates from within a specified range of dates. This is straightforward enough to do. The problem is that the allowable range of dates changes depending on another select box (with building names in). So what I need to happen is to look up the building in a mysql database, return the min and max date allowed and use the datepicker to allow users to choose a date range within the allowable range. On my main page, I am currently using: $('#dateStartMainChart').load(url); to load a php file which

Daylight Saving Cause an issue on jQuery UI datepicker on Firefox

痞子三分冷 提交于 2019-11-30 23:09:51
I'm having an issue with jQuery UI datepicker on Firefox. I am working on a system based on schedules for a future date and I noticed that 2016-03-31 is Thursday, which is correct, but 2016-04-01 is also Thursday when it should be Friday! The issue appeared on both the desktop and mobile version of Firefox, but not on other browsers. The interesting thing is, it happens in the demos on https://jqueryui.com/datepicker/ too! Screenshot on https://jqueryui.com/datepicker/ for March 2016: Screenshot on https://jqueryui.com/datepicker/ for April 2016: As you can see, all dates on April have the

How to constrain min and max dates for jQuery-ui datepicker based on another date

我只是一个虾纸丫 提交于 2019-11-30 21:58:28
问题 I would like to know how can we set the check-out date between the check-in date. Like if we select the month of June (when current month is February) and the 15th day. So it gives the authority to select the day between 30 days(30 limit). So the end date would be: 15 July. Here we have a code: <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/black-tie/jquery-ui.css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax

jQuery UI Datepicker after select/change month/year

陌路散爱 提交于 2019-11-30 21:07:44
I wanted to find out how I can run some piece of code (attach mouseenter event) for every day after user has selected a day or changed a month/year? I have tried to attach the event on these events beforeShow beforeShowDay onChangeMonthYear onSelect On hover I want to highlight next day in the same row if it exists. Currently I attach moouseenter/mouseleave event to all days after datepicker is created (which is inline). I have simplified what I'm doing in the JS fiddle below. I need to have those events working after a date is selected and after month/year has been changed. JS Fiddle: http:/

Is there a way to style jquery's datepicker days?

你说的曾经没有我的故事 提交于 2019-11-30 20:05:53
Let's say I want 5/2/2011 (or any other day) to be a different color than the rest of the days. Is this possible? This is an example item for a particular day <td class=" " onclick="DP_jQuery_1305738227207.datepicker._selectDay('#datepicker',4,2011, this);return false;"><a class="ui-state-default ui-state-hover" href="#">11</a></td> I don't know if there's any way to override how the datepicker creates ids/classes for each day. Working Example: http://jsfiddle.net/hunter/UBPg5/ You can do this by adding a beforeShowDay callback Bind your callback: $("input:text.date").datepicker({

jQuery Datepicker for multiple inputs

假装没事ソ 提交于 2019-11-30 19:26:35
I have a jQuery datepicker script: $(function() { $( "#datepicker" ).datepicker({ dateFormat: "yyyy-mm-dd" }); }); When I want to initialize this script for two inputs, it works only for the first one. How to use it for both inputs? <input type="text" name="MyDate1" id="datepicker"> <input type="text" name="MyDate2" id="datepicker"> Just change all id to class . <input type="text" name="MyDate1" class="datepicker"> <input type="text" name="MyDate2" class="datepicker"> $(function() { $( ".datepicker" ).datepicker({ dateFormat: "yyyy-mm-dd" }); }); also can use $(function() { $( "input[name^

How to setup bootstrap-datepicker-rails?

大憨熊 提交于 2019-11-30 18:13:01
Anybody knows how to setup the gem bootstrap-datepicker-rails? I followed the steps in http://rubydoc.info/gems/bootstrap-datepicker-rails/0.6.21/frames , basically: I setup twitter-bootstrap-rails gem I add this to gemfile gem 'bootstrap-datepicker-rails', '>= 0.6.21' Add this line to app/assets/stylesheets/application.css *= require bootstrap-datepicker Add this line to app/assets/javascripts/application.js //= require bootstrap-datepicker Add this line to app/assets/javascripts/controllername.js.coffee $('.datepicker').datepicker() Finally use in view :) <input type="text" data-behaviour=

jQuery UI datepicker doesn't hide when click outside

你离开我真会死。 提交于 2019-11-30 17:19:45
I found a problem with jQuery UI Datepicker on my site. When I click on the input, it does show a datepicker properly. Nevertheless, when I don't select any date and I just click outside the element, it doesn't hide the datepicker as I'd expect. When I press the Esc, it disappears, when I select a day it disappears but when I click outside it stays there. Is there anyone who is able to find the problem? Link: http://pec.solarismedia.net/index.html#content Your datepickers have the class hasDatepicker , so try this: $(".hasDatepicker").blur(function(e) { $(this).datepicker("hide"); }); I'm 99%