I am using jQuery datepicker, and I want to set the year range. This is my code:
$( "#birthday" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-100:-10"
});
It loads and becomes unresponsive until both year and month drop down items are selected. What am I doing wrong in above code?
Related
I have tried to make the labels for both datasets in the chart.js found here.
example of chart.js to appear when hovering over the different days in the chart
I have tried to add this...
options: {
tooltips: {
mode: 'index',
intersect: false
},
hover: {
mode: 'index',
intersect: false
}
}
Bu that does not help, in a perfect world I would like to display it like 28 (30) when hovering over SUNDAY. Can somebody help out please?
Since you dont use the build in tooltip to display those values setting tooltip modes dont matter.
To get what you want just put the values in the same span the way you like so you would get this:
<div class="tick">
SUN
<span class="value value--this">28 (30)</span>
</div>
https://codepen.io/leelenaleee/pen/OJjOamw
I try to display week numbers but nothing happens
I put weeknumber in the javascript file
$(document).ready(function() {
$('#calendar').fullCalendar({
weekNumbers: true,
height:400,
header: {
left: 'prev,next today, save',
center: 'title',
right: 'month,agendaWeek,agendaDay,agendaFourDay'
},
'defaultView': 'month',
editable: true,
.....
what is this problem ?
Did you import necessary CSS and js for it ?
<link rel='stylesheet' href='fullcalendar/fullcalendar.css' />
<script src='lib/jquery.min.js'></script>
<script src='lib/moment.min.js'></script>
<script src='fullcalendar/fullcalendar.js'></script>
moreover
weekNumbers:
If set to true, week numbers will be displayed in a separate left column in the month/basic views as well as at the top-left corner of the agenda views. See Available views
I have some javascript and query that I would like to use together.
How can I make the dataset use the query columns not the hardcore data.
I know I will have to probably use loop and cfscript since using js will give me errors.
<script type="text/javascript">
// Create a DataSet (allows two way data-binding)
var items = new vis.DataSet([
{id: 1, content: 'item 1', start_time: '2014-04-20'},
{id: 2, content: 'item 2', start_time: '2014-04-14'},
{id: 3, content: 'item 3', start_time: '2014-04-18'}
]);
// Configuration for the Timeline
var options = {};
// Create a Timeline
var timeline = new vis.Timeline(container, items, options);
</script>
<cfquery name="getimeline">
SELECT content,start_time
FROM timeline
</cfquery>
This approach should get you started.
<cfquery name="getTimeLine">
SELECT content,start_time
FROM timeline
</cfquery>
<script>
var items = new vis.DataSet([
<cfoutput query="getTimeLine">
{id: #currentrow#, content: '#content#', start_time: '#dateformat(start_time, "yyyy-mm-dd")#'},
</cfquery>
]);
Intentionally left out in order to make you do some work, is the part where you exclude the comma from the last item.
I want to change "Today" button text in Jquery datepicker to "Present".
and also customise the functionality
Any thoughts please
Answer from the comment. It may be helpful to some people
currentText: "Present"
code example:
$('.date-picker').datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
currentText: 'present',
closeText : 'Close',
dateFormat: 'MM yy',
});
I have tried rahul's code. It looks like this
$("input:text.inputTypeDate").datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true
});
});
ASP
<asp:TextBox ID="txtDt" runat="server" Width="120px" class="inputTypeDate">
</asp:TextBox>
It works fine on page load, but when I clear the textbox, it stops working.