jquery-ui-datepicker

jquery ui datepicker day/month only, not year selection

寵の児 提交于 2019-12-30 04:03:09
问题 I've searched here in SO and all around but no properly solutions founded for this issue. With jQueryUI DatePicker I need to select a recursive date for all years, so I don't wanna show year selection, 'cause it doesn't make sense. How can I obtain this inside the call like the following? $('#myInput').datepicker({ dateFormat: "dd/mm" }); Note: I can't use css solution as suggested here .ui-datepicker-year{ display:none; } because there are other datepickers in the same page. Any help will be

jquery datepicker: validate date

假如想象 提交于 2019-12-29 08:30:08
问题 i have set a jquery class: $(function() { $( ".datepickerIT" ).datepicker({ showOtherMonths: true, selectOtherMonths: true, showAnim: "clip", dateFormat: "dd/mm/yy", minDate: "01/01/1925", maxDate: "31/12/2050", changeMonth: true, changeYear: true, yearRange: "1925:2050", regional: "it" }); }); I want to add a date check control that alert if user input not is a valid date How can add to the class ".datepickerIT" a check like this? onClose: function(dateText, inst) { try { $.datepicker

Remove Datepicker Function dynamically

旧城冷巷雨未停 提交于 2019-12-28 05:35:27
问题 I want to remove datepicker function depending on the dropdownlist selected value. I try the following codes, but it still shows the calendar when I put the cursor in the text box. Please give me a suggestion. $("#ddlSearchType").change(function () { if ($(this).val() == "Required Date" || $(this).val() == "Submitted Date") { $("#txtSearch").datepicker(); } else { $("#txtSearch").datepicker("option", "disabled", true); } }); 回答1: You can try the enable/disable methods instead of using the

Select only specific dates in jQuery UI datepicker (date list comes from AJAX)

时光怂恿深爱的人放手 提交于 2019-12-28 03:00:09
问题 Here I send movie id and get available days and I want to set it into calendar. but it is not working and it disable all dates. From the PHP it returns date string. Date string is coming correctly but the calendar is not working. Please help. Date string example "28-02-2012","29-02-2012","01-03-2012","02-03-2012","03-03-2012","04-03-2012","05-03-2012","06-03-2012","07-03-2012","08-03-2012","09-03-2012","28-02-2012","29-02-2012","01-03-2012","02-03-2012","03-03-2012","04-03-2012","05-03-2012",

How to change the pop-up position of the jQuery DatePicker control

微笑、不失礼 提交于 2019-12-27 11:08:49
问题 Any idea how to get the DatePicker to appear at the end of the associated text box instead of directly below it? What tends to happen is that the text box is towards the bottom of the page and the DatePicker shifts up to account for it and totally covers the text box. If the user wants to type the date instead of pick it, they can't. I'd rather have it appear just after the text box so it doesn't matter how it adjusts vertically. Any idea how to control the positioning? I didn't see any

How to change the pop-up position of the jQuery DatePicker control

拈花ヽ惹草 提交于 2019-12-27 11:07:12
问题 Any idea how to get the DatePicker to appear at the end of the associated text box instead of directly below it? What tends to happen is that the text box is towards the bottom of the page and the DatePicker shifts up to account for it and totally covers the text box. If the user wants to type the date instead of pick it, they can't. I'd rather have it appear just after the text box so it doesn't matter how it adjusts vertically. Any idea how to control the positioning? I didn't see any

How to change the background color of current day in jquery datepicker onclick?

旧时模样 提交于 2019-12-25 18:44:33
问题 I am using jQuery datepicker in angularjs, By overriding css I am displaying orange color background to the current date .ui-state-highlight{ background-color:orange; } Now the requirement is the background color of current date must be changed to red when clicked. I have tried calling a function onSelect which changes the background color in datepicker defaults,but that's not working.How to achieve this? 回答1: You could use onSelect event to change the css of current date onSelect: function

How to add jQuery UI's datepicker to a Liferay 7 portlet?

让人想犯罪 __ 提交于 2019-12-25 09:02:10
问题 I'm trying to add jQuery UI's datepicker to my Liferay 7 portlet, yet I keep getting this error: Object doesn't support property or method 'datepicker' I'm setting up the dependency like this: @Component( immediate = true, property = { "com.liferay.portlet.display-category=category.tests", "com.liferay.portlet.header-portlet-javascript=https://code.jquery.com/ui/1.12.1/jquery-ui.js", "com.liferay.portlet.instanceable=true", "javax.portlet.display-name=Advanced Date Picker", "javax.portlet

Datepicker (month and year) not working inside fancybox

倾然丶 夕夏残阳落幕 提交于 2019-12-25 08:48:19
问题 I am having a problem with my fancybox 3 and jquery ui datepicker. if I place the datepicker outside the fancybox.. the dropdown for months and years are working.. but when I place it inside fancybox. the dropdown is not being triggered. any idea what is happening? $("#Date_To").datepicker({changeMonth: true,changeYear: true}); image 回答1: Try disabling focusing, something like this: $('[data-fancybox]').fancybox({ autoFocus : false, trapFocus : false, touch : false, beforeClose : function() {

JQuery UI datepicker strange problem (happens in Firefox)

落爺英雄遲暮 提交于 2019-12-25 08:36:30
问题 I use the following function to disable days from 2011-02-13 to 2011-02-18 in the date picker calendar: function no_disabled_days(date){ dateStr1 = '2011-02-13'; dateStr2= '2011-02-18'; disabled_start_day = new Date(dateStr1); disabled_end_day = new Date(dateStr2); if(date >= disabled_start_day && date <= disabled_end_day){ return [false]; } return [true]; } $("#reserve_date").datepicker({ beforeShowDay: no_disabled_Days }); For example, if dateStr1='2011-02-13' , dateStr2='2011-02-18' , the