change date format from jquery

前端 未结 3 2017
野性不改
野性不改 2020-12-11 08:33

I have this date, that I get from jquery

Wed Oct 30 2013 09:05:17 GMT-0800 (Hora estándar Pacífico (México))

that I get this function

3条回答
  •  误落风尘
    2020-12-11 08:59

    A couple of options.

    If you're OK with including jQueryUI: $("#vigencia_receta_11").val($.datepicker.formatDate('dd/M/yy', nd));

    Otherwise, the jQuery dateFormat plugin does something similar: $("#vigencia_receta_11").val($.format.date(nd, 'dd/M/yy'));

提交回复
热议问题