jquery-ui-datepicker

jQuery datepicker adding custom button

吃可爱长大的小学妹 提交于 2019-11-28 11:39:42
I'm trying to add a custom button to the button panel of jQuery's datepicker. When I apply the following code though nothing happens: $('.date-picker').datepicker( { changeMonth: true, changeYear: true, showButtonPanel: true, beforeShow: function(input) { setTimeout(function() { var buttonPane = $(input).datepicker("widget").find( ".ui-datepicker-buttonpane" ); var btn = $('<button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Clear</button>'); btn.unbind("click").bind("click", function () { $.datepicker._clearDate( input ); }); btn.appendTo(

404 errors on bundled jquery css, VS2012 publishing to Azure

拈花ヽ惹草 提交于 2019-11-28 10:10:37
I have a web site that uses the jquery datepicker thing (implemented in regular VS2012 MVC4 template). It looks and works fine when running on localhost. But when I publish (to Azure), some of the css is missing. The Chrome dev tools show 404 errors on two css files: http://cyclelog.azurewebsites.net/Content/jquery.ui.base.css http://cyclelog.azurewebsites.net/Content/jquery.ui.theme.css I noticed that there are no such files in my source tree--rather the two files are under ~/Content/themes/base (not directly under Content/). I didn't know what to make of this because--like I said--the css

jQuery event handler .on() not working

痴心易碎 提交于 2019-11-28 07:12:59
I want to attach a event to dynamically created element class.So i used live function but it was not triggered. So checked live function reference ,there i red below notes As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live(). so decide to use on function,But it still not working.The text field is already attached with jquery ui datpicker.On another element select i disabled that field. jQuery("#from").attr('disabled','disabled') .removeClass('date_picker_bg') .removeClass(

Proper way to add a callback to jQuery DatePicker

≡放荡痞女 提交于 2019-11-28 06:55:00
DatePicker has an internal function, _adjustDate() , which I'd like to add a callback after. Current Method This is how I'm currently doing this. Basically, just replacing the function defintion with itself, plus the new operations. This effects all datepickers, which I'm not sure is desired, either. $(function(){ var old = $.datepicker._adjustdate; $.datepicker._adjustDate = function(){ old.apply(this, arguments); // custom callback here console.log('callback'); }; }); _adjustDate is what's called during the next/prev month clicks. The function takes three parameters. I'm curious if there's a

Sonata Admin Bundle: DatePicker range

三世轮回 提交于 2019-11-28 06:51:48
How would I create a doctrine_orm_datetime_range filter in the Sonata Admin Bundle which uses the jQuery UI datepicker? I tried the following, but it doesn't work: protected function configureDatagridFilters(DatagridMapper $datagridMapper) { $datagridMapper ->add('datumUitgevoerd', 'doctrine_orm_datetime', array('widget' => 'single_text'), null, array('required' => false, 'attr' => array('class' => 'datepicker'))) ; } pulzarraider UPDATED 2016-02-02 If you are using 3.* Symfony the following twig configuration must be used: # app/config/config.yml twig: # ... form_themes: - 'SonataCoreBundle

Date range picker on jquery ui datepicker

ぐ巨炮叔叔 提交于 2019-11-28 04:12:18
I created a date range picker using jquery ui where you can use the same inline calendar to make both of your date selections. See my fiddle here: http://jsfiddle.net/kVsbq/4/ JS $(".datepicker").datepicker({ minDate: 0, numberOfMonths: [12, 1], beforeShowDay: function (date) { var date1 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#input1").val()); var date2 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#input2").val()); return [true, date1 && ((date.getTime() == date1.getTime()) || (date2 && date >= date1 && date <= date2)) ? "dp-highlight" : ""]; },

jQuery Datepicker localization

时光总嘲笑我的痴心妄想 提交于 2019-11-28 03:32:16
I need a french calendar and I can't understand the problem. I guess I'm not using the regional options like it should be. But... Here is my code : $(function() { $('#Date').datepicker({ showMonthAfterYear: false, showOn: 'both', buttonImage: 'media/img/calendar.png', buttonImageOnly: true, dateFormat:'d MM, y' }, $.datepicker.regional['fr'] ); }); Najeebullah Shah You can do like this $.datepicker.regional['fr'] = {clearText: 'Effacer', clearStatus: '', closeText: 'Fermer', closeStatus: 'Fermer sans modifier', prevText: '<Préc', prevStatus: 'Voir le mois précédent', nextText: 'Suiv>',

jQuery UI Datepicker : how to add clickable events on particular dates?

孤街醉人 提交于 2019-11-28 03:20:20
I want to highlight the dates on jquery datepicker where there are events attached to it (i'm not talking about js event, but real life events :D). How to pass the event dates to the calendar? How to make it clickable, either to display the event(s) with their url in a small popup tip, either to go to the event page? Are there already available plugins or ressources (like tutorials) to help me achieve that please? Thanks. PS: I'm not using the datepicker to pick a date, only to access the events attached to a date PS2: I'll use it on a multilingual website (fr and english), that's why I

How to combine the jQueryUI DatePicker's Icon Trigger with Bootstrap 3's Input Groups

吃可爱长大的小学妹 提交于 2019-11-28 03:13:35
问题 jQueryUI has a nice DatePicker with icon trigger (a calendar icon opens the calendar, similar behaviour to Outlook). On the other hand, Bootstrap 3's Input Groups are really nice for connecting icons to input fields. Can the two be combined without rewriting either one? I have made a JSFiddle here. For the «Start Date» the jQueryUI icon trigger is not active. For the «End Date» it is enabled. The DatePicker icon, unfortunately, appears outside of the End Date's Input Group: So, is it possible

jQuery UI: Datepicker set year range dropdown to 100 years

送分小仙女□ 提交于 2019-11-28 02:37:17
Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added. How can we set the initial range to be 100 years so that the user will see a large list by default? function InitDatePickers() { $(".datepicker").datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, maxDate: '@maxDate', minDate: '@minDate' }); } You can set the year range using this option per documentation here http://api.jqueryui.com/datepicker/#option-yearRange yearRange: '1950:2013', // specifying a hard coded year range or this