글
CalendarView CalendarView.js 가 stack 오버플로 오류가 났을 경우 해결 방법
J/Javascript
2012. 3. 10. 23:00
jsCalendar - Stack Overflow (v8)
Hi
I have just installed version 8 and I am working with a project crated in version 7
When using the jsCalendar extension to input a date field this works fine except when tring this to add a new record in the new Grid Add Master detail option
In this mode the calendar does not exit the screenm when a date is selected.
In Google Chrom nothin happens
In Internet Explorer 8 I get a stack overflow error at line 1879 error message
Please can you advise
Thanks, Paul
I have just installed version 8 and I am working with a project crated in version 7
When using the jsCalendar extension to input a date field this works fine except when tring this to add a new record in the new Grid Add Master detail option
In this mode the calendar does not exit the screenm when a date is selected.
In Google Chrom nothin happens
In Internet Explorer 8 I get a stack overflow error at line 1879 error message
Please can you advise
Thanks, Paul
- paul.basher
Re: jsCalendar - Stack Overflow (v8)
The jsCalendar modify the JavaScript Date object , but the calendar.js cannot be included more than once or it will repeatedly set up the Date object.
You can fix the calendar.js as follows:
if (!Date.prototype.__msh_oldSetFullYear) { // add this line
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
Date.prototype.setFullYear = function(y) {
var d = new Date(this);
d.__msh_oldSetFullYear(y);
if (d.getMonth() != this.getMonth())
this.setDate(28);
this.__msh_oldSetFullYear(y);
};
} // add this line
또는
if (!Date.prototype.__msh_oldSetFullYear) { // add this line 내가 전에 했을 땐 이 부분이 잘 됬다.
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
} // add this line
Date.prototype.setFullYear = function(y) {
var d = new Date(this);
d.__msh_oldSetFullYear(y);
if (d.getMonth() != this.getMonth())
this.setDate(28);
this.__msh_oldSetFullYear(y);
};
You can fix the calendar.js as follows:
if (!Date.prototype.__msh_oldSetFullYear) { // add this line
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
Date.prototype.setFullYear = function(y) {
var d = new Date(this);
d.__msh_oldSetFullYear(y);
if (d.getMonth() != this.getMonth())
this.setDate(28);
this.__msh_oldSetFullYear(y);
};
} // add this line
또는
if (!Date.prototype.__msh_oldSetFullYear) { // add this line 내가 전에 했을 땐 이 부분이 잘 됬다.
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
} // add this line
Date.prototype.setFullYear = function(y) {
var d = new Date(this);
d.__msh_oldSetFullYear(y);
if (d.getMonth() != this.getMonth())
this.setDate(28);
this.__msh_oldSetFullYear(y);
};
- Webmaster
- Posts: 18139
- Joined: Fri Aug 06, 2004 5:59 pm
- Location: http://www.hkvstore.com/
Re: jsCalendar - Stack Overflow (v8)
Thanks, I have amended as you described and everything works fine
'J > Javascript' 카테고리의 다른 글
클로져 활용법 (0) | 2014.03.18 |
---|---|
javascript arguments를 array로 변환하기 (0) | 2014.03.16 |
JavaScript - Prototype's delay() Function (0) | 2014.03.16 |
javascript 파일 저장하기 (0) | 2012.12.25 |
섹시한 자바스크립트 코딩 컨벤션 (0) | 2012.03.02 |