Giter Club home page Giter Club logo

Comments (2)

singod avatar singod commented on June 2, 2024

时间戳转换会误差月份,新版本已经修复了!下个星期会发布新版本!
《减天数的时候,小数字的时候还好,-30天的时候,很明显》 希望您能共享一下您写的代码,非常感谢!

from jedate.

justin107 avatar justin107 commented on June 2, 2024

var start = {
format: 'YYYY-MM-DD hh:mm:ss',
minDate: '2014-06-16 23:59:59', //设定最小日期为当前日期
isinitVal:true,
festival:true,
ishmsVal:false,
maxDate: $.nowDate({DD:0}), //最大日期
choosefun: function(elem, val, date){
end.minDate = date; //开始日选好后,重置结束日的最小日期
endDates();
}
};
var end = {
format: 'YYYY年MM月DD日 hh:mm:ss',
minDate: $.nowDate({DD:0}), //设定最小日期为当前日期
festival:true,
maxDate: '2099-06-16 23:59:59', //最大日期
choosefun: function(elem, val, date){
start.maxDate = date; //将结束日的初始值设定为开始日的最大日期
}
};
以上是官网例子片段,假设今天是8月31号,那么initAddVal:{DD:"-30"}应该是7月31日?
但是start给出的值是7月32日(/ □ ),-29,-31似乎都没出错,无奈自己写了方法初始开始日期

抱歉才看到回复,希望作者完善这个实用方法,加油

from jedate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.