JQuery Datepicker returned Date object type

后端 未结 4 1670
野性不改
野性不改 2021-01-19 13:46

What\'s the object type returned by Datepicker? Supposing I have the following:

$(\"#txtbox\").datepicker({
   onClose: function(date){
          //something         


        
4条回答
  •  北荒
    北荒 (楼主)
    2021-01-19 14:39

    I just downloaded the source from here and noticed (ex line 600) the author is using .getTime() to compare dates, have you tried that?

    if (oDate.getTime() > date.getTime()) {
        ...
    }
    

    Also this is tangential but you mention you tried oDate.toString() while I noticed in the examples the author is using .asString()

提交回复
热议问题