Added in prototype Date method getCountDaysInMonth for less depend with date-parse library

This commit is contained in:
Valeriy 2014-05-23 16:37:24 +06:00
parent 83206a7501
commit 13c66d7821
3 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name":"datetimepicker",
"version":"2.2.7",
"version":"2.2.8",
"main": [
"jquery.datetimepicker.js",
"jquery.datetimepicker.css"

View File

@ -1,6 +1,6 @@
{
"name": "datetimepicker",
"version": "2.2.7",
"version": "2.2.8",
"title": "jQuery Date and Time picker",
"description": "jQuery plugin for date, time, or datetime manipulation in form",
"keywords": [

View File

@ -1,5 +1,5 @@
/**
* @preserve jQuery DateTimePicker plugin v2.2.7
* @preserve jQuery DateTimePicker plugin v2.2.8
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
* (c) 2014, Chupurnov Valeriy.
*/
@ -242,6 +242,10 @@
}
};
Date.prototype.countDaysInMonth = function(){
return new Date(this.getFullYear(), this.getMonth()+1, 0).getDate();
};
$.fn.xdsoftScroller = function( _percent ) {
return this.each(function() {
var timeboxparent = $(this);
@ -879,7 +883,7 @@
var d,y,m,classes = [];
while( i<_xdsoft_datetime.currentTime.getDaysInMonth()||start.getDay()!=options.dayOfWeekStart||_xdsoft_datetime.currentTime.getMonth()==start.getMonth() ) {
while( i<_xdsoft_datetime.currentTime.countDaysInMonth()||start.getDay()!=options.dayOfWeekStart||_xdsoft_datetime.currentTime.getMonth()==start.getMonth() ) {
classes = [];
i++;