EasyUI Forum
April 26, 2024, 11:52:30 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datebox example  (Read 10459 times)
ClSoft
Jr. Member
**
Posts: 92


View Profile
« on: February 26, 2013, 02:18:22 AM »

Hi development,
Date format example have bug:
http://www.jeasyui.com/demo/main/index.php?plugin=DateBox&theme=default&dir=ltr&pitem=
(Date format example)

instead of two "ss"
var y = parseInt(ss[0],10); 
var m = parseInt(ss[1],10); 
var d = parseInt(ss[2],10); 

it should be one "s"
var y = parseInt(s[0],10); 
var m = parseInt(s[1],10); 
var d = parseInt(s[2],10); 
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 26, 2013, 07:20:29 AM »

The 'ss' variable is right. The 'myparser' function is declared as:
Code:
function myparser(s){
if (!s) return new Date();
var ss = s.split('-');
var y = parseInt(ss[0],10);
var m = parseInt(ss[1],10);
var d = parseInt(ss[2],10);
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
return new Date(y,m-1,d);
} else {
return new Date();
}
}
Logged
ClSoft
Jr. Member
**
Posts: 92


View Profile
« Reply #2 on: February 26, 2013, 07:57:01 AM »

Hi
not sure that we are talking about same thing - please see image:
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: February 26, 2013, 08:07:01 AM »

There is a little mistake while highlighting the code. Now it has been fixed.
Logged
ClSoft
Jr. Member
**
Posts: 92


View Profile
« Reply #4 on: February 26, 2013, 08:20:46 AM »

Thanks  Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!