Good day,
In my old jQuery, my datepicker is allow to select by year, I checked the code, its control by a jQuery css class call ui-datepicker-new-year. This class is located at ui.datepicker.css, and being call in ui.datetimepicker.min.js.
Its look like this:
I upgrade my jQuery version to 1.12.1. And found that the class ui-datepicker-new-year no longer exists in the jquery-ui.js and jquery-ui.css file. Thus, my datepicker no longer can select by year like above picture.
Would like to ask, is it any other ways that I can call the year selection in the latest jQuery UI? Or the latest jQuery UI no longer support year selection?
You can try this to show change year dropdown
$("#datepicker" ).datepicker({
changeMonth: true,
changeYear: true
});
Related
I have a simple installation of Bootstrap Datepicker:
HTML:
<div id="datepicker"></div>
JS:
$("#datepicker").datepicker( {minViewMode: "days", maxViewMode: "days"});
I am trying to disable the user's ability to switch to month view (achieved by clicking on the month title). I have set maxViewMode to days as per the docs, but it doesn't work.
JS Fiddle here.
Where am I going wrong? Is this a bug?
You are using Bootstrap Datepicker version 1.4.0. Option maxViewMode is added in version 1.5.0 (not released yet).
Official docs for version 1.4.0
Here is working example in jsFiddle.
The icon shows only when I am using jQuery UI 1.8.18, if I am using the latest version which is jQuery UI 1.8.21, then the icon won't show up?
Is there a bug or am I missing something?
The Trent datetime picker documentation is here.It says "In addition all datepicker options are still available through the timepicker addon."
Thanks.
Error: $("#from-datetime").datetimepicker is not a function
Source File: http://fiddle.jshell.net/_display/
Line: 73
It's just a datepicker not datetimepicker
Datetimepicker is another jquery plugin, may be it's not compatible with newest JUI
Working example
http://jsfiddle.net/uDVwx/3/
The point is you have to call in this order: jquery, jquery ui, jquery addons. But as I look at the console debug, there is an error with datetime picker addon and jquery ui 1.8.21
I've managed to display the calendar in the UI, but I can't make it react to any events. I've tried
$(function() {
$('#datepicker').datepicker({
onSelect: function(dateText, inst) {alert(dateText); }
});
});
but it doesn't work... Please help
Looks like a bug to me. Issue filed with Caja as issue 1496.
Update: turns out this is a jQueryUI bug, which is fixed in the latest jQuery revision but not the official stable revision (8.22). If you find a link to a version >= 8.22 hosted somewhere it should work although it will be slowish. We will get the update as soon as jQueryUI releases a new stable branch.
I have this code in my view.
$("#Effective Date").datepicker({
showOn: "button",
buttonText: "..."
});
I am able to see the the date and I can select the date. But when I open the datepicker Iam not seeing the Arrows on the popup box. << < March 2012 > >>
can anybody please help me out
It must be something to do with the CSS you're using.
Here is a jsFiddle.
http://jsfiddle.net/C9rCT/
It uses jQuery 1.7, jQuery UI and links to the jQuery UI CSS file from Google (http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css)
Make sure you also have the CSS and images from the jQuery you downloaded.
These 'arrows' are backround image. Check the css.
I used the example from here MasterCalendar
But this works fine in IE where as in mozila it does not work i tried as he said by naimg with the control id then the selected date is not getting displayed so can any one give me a solution for this.
Hi user just change the YearRange as follows
yearRange: 'c-100:c+0'
It will display from 1911-2011 if needed change c-100 values as per your requirement
Use jquery UI datepicker instead of that
http://jqueryui.com/demos/datepicker/
cheers!