jquery-ui-datepicker

jQuery datepicker not working with iPad

一个人想着一个人 提交于 2019-12-11 18:29:25
问题 $(function () { $('.Month-Picker').datepicker({ changeMonth: true, changeYear: true, showButtonPanel: false, dateFormat: 'MM-yy', onClose: function (dateText, inst) { var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val(); var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val(); $(this).datepicker('setDate', new Date(year, month, 1)); $("#<%=btnMonthYear.ClientID %>").click(); }, beforeShow: function (input, inst) { if ((datestr = $(this).val()).length > 0) {

textfield not displaying date picked from jquery datepicker in mvc3?

左心房为你撑大大i 提交于 2019-12-11 15:38:27
问题 <script type="text/javascript"> $(document).ready(function () { $('.date').datepicker ({ dateFormat: 'mm/dd/yyyy', showStatus: true } }); }); </script> <div> Date: <input type="text" id="datepicker"/> </div> <div> @Html.TextBox("toDate", Model.toDate.ToString("dd/MM/yyyy"), new { @class = "date" }) </div> The above is cshtml page.. I am clueless why the date that i click on the datepicker wont show up on the texbox/input .. Can you help? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http

How to get datepicker to be highlighted upon refresh

心不动则不痛 提交于 2019-12-11 15:17:49
问题 I have a datepicker that highlights a selected week. It is using an ajax request. Which is where I am having a problem. When I select a week i.e. 29/08/11 and the page refreshes the highlighted week is no longer highlighted. Datepicker.js $(function() { var startDate; var endDate; var selectCurrentWeek = function() { window.setTimeout(function () { $('.week-picker').find('.ui-datepicker-current-day a').addClass('ui-state-active')}, 1000); } function check(d) { if(d.length() == 2) { dd = d;

Fill text box with date but don't show weekends in JQuery Date Picker

假装没事ソ 提交于 2019-12-11 14:57:41
问题 I am using the below code to display date or preload date in the date text field when the page is loaded. $(function() { $("#datepicker").datepicker({ dateFormat: "yy-mm-dd" }).datepicker("setDate", "0"); }); But I want to skip Weekend days Saturday and Sunday displaying/prelading the date field. Please Help! 回答1: There is the beforeShowDay option, which takes a function to be called for each date, returning true if the date is allowed or false if it is not. From the docs: beforeShowDay The

jquery datetime picker is not working after jquery ajax called?

喜夏-厌秋 提交于 2019-12-11 14:46:49
问题 i am using jquery datepicker on jsp page and when i call ajax to load some data from server and on success of ajax data loads to div tag after that i cant see the datepicker. when i click on textfield i shows date picker but on click of button i m loading data through ajax and after that date picker is not working <html> <head> <script> $(document).ready(function() { $('#end_dtnw').datepicker({ dateFormat: 'dd-M-yy' }); $("#reportList").click(function(){ $.ajax({ type : 'Post', url : 'www

DatePicker puts text on button instead of image

試著忘記壹切 提交于 2019-12-11 14:15:25
问题 jquery UI date picker puts a text on top of a button instead of the image which I attempt to link to in the Jquery. This occurs on submit and when IE 8 is in compatibility mode. Has anybody ever come across this? This is the weirdest thing I have ever seen. Anybody have any idea why this is going on? Let me show you a picture of what I am experiencing. Before, After. Here is the code that i use for the DatePicker $(".datepicker1").datepicker({ showOn: 'both', buttonImage: '<%=Url.Content("~

set end Date after select start date

流过昼夜 提交于 2019-12-11 12:06:11
问题 JSFIDDLE How can I set end date which must be 1 day after than start date? $("#beginDate").datepicker({ minDate: 1, changeMonth: true, dateFormat: 'mm/dd/yy', onClose: function (selectedDate, instance) { if (selectedDate != '') { $("#endDate").datepicker("option", "minDate", selectedDate); var date = $.datepicker.parseDate(instance.settings.dateFormat, selectedDate, instance.settings); date.setMonth(date.getMonth() + 3); console.log(selectedDate, date); $("#endDate").datepicker("option",

how to use jquery datepicker in jsf

若如初见. 提交于 2019-12-11 11:29:33
问题 I want to use the jquery datepicker: http://jqueryui.com/datepicker/ But I don't know what I need, and here is my code: <script src="css/jquery-1.9.1.js"></script> <script src="css/jquery.ui.core.js"></script> <script src="css/jquery.ui.widget.js"></script> <script src="css/jquery.ui.datepicker.js"></script> <script type="text/javascript"> $(".datepicker").datepicker({ showOn: "button", buttonImage: "images/calendar.gif", buttonImageOnly: true }); The place I put my datepick is like: <h

Angular UI directive inside custom directive

浪子不回头ぞ 提交于 2019-12-11 11:06:25
问题 Similar question but the question isn't sufficiently answered In the following code, why doesn't uib-datepicker-popup turn into an angular UI date picker? Am I missing some flag/compile option for the directive? This is a stripped down example of the datepicker-popup example in the Angular-UI documentation, modified to be inside a directive. Notice how it works when used with the controller but doesn't work in my example with the directive. angular.module('ui.bootstrap.demo', ['ngAnimate',

jquery datepicker after setDate no longer able to change Month and Year in the header

不羁岁月 提交于 2019-12-11 10:57:23
问题 I'm using the JQuery UI Datepicker to pick date. I set "changeMonth" and "changeYear" to true at the initialization. $( "#from" ).datepicker({ defaultDate: "+1w", changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', onClose: function( selectedDate ) { $( "#to" ).datepicker( "option", "minDate", selectedDate ); } }); $( "#to" ).datepicker({ defaultDate: "+1w", changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', onClose: function( selectedDate ) { $( "#from" ).datepicker(