Datetime Plugin

Datetime Plugin

tdktdk Posts: 32Questions: 16Answers: 0

When I define my column like this

{ data: "ReviewDate", type: "date", render: $.fn.dataTable.render.moment("DD-MM-YYYY","YYYY-MM-DD","en")

I always get "invalid date" returned.

Answers

  • allanallan Posts: 64,923Questions: 1Answers: 10,753 Site admin

    Can you link to the page showing the issue so it can be debugged please?

    Allan

  • tdktdk Posts: 32Questions: 16Answers: 0

    Hi Allan,

    No debug page available at the moment but this works
    render: function (data) { if (moment(data).isValid()) return moment(data).format("DD/MM/YYYY hh:mm"); else { return ""; } }

    and this doesn't

    { data: "ReviewDate", type: "date", render: $.fn.dataTable.render.moment("DD/MM/YYYY hh:mm")

  • allanallan Posts: 64,923Questions: 1Answers: 10,753 Site admin

    I'm afraid I'd really need a page showing the issue, or at least the data that is causing the problem.

    Allan

This discussion has been closed.