spjs.dffs.formatDate

Forums Dynamic Forms for SharePoint spjs.dffs.formatDate

This topic contains 5 replies, has 3 voices, and was last updated by  Paul Lynch 2 weeks, 2 days ago.

  • Author
    Posts
  • #23573

    Peter Giesselink
    Participant

    I the last update v4.4.3.60 this function is introduced.
    I’ve tried a quick test on the DFFS example Training application parseDateFunction but I was not successful.
    Error 80020101 was thrown.

    function parseDateFunc(a){
    // Set the desired format in the variable “f”
    var f = “dd/MM/yyyy HH:mm” , d = new Date(a);
    return spjs.dffs.formatDate(d, f);
    }

    Can you give a clue who to call this function. Maybe I overlook something simple.

  • #23581

    Alexander Bautz
    Keymaster

    What is the format of the argument you pass in to the function parseDateFunc? I guess your new Date(a) function fails to parse a to a valid date.

    Alexander

  • #23583

    Peter Giesselink
    Participant

    I’ve checked this and it’s not the problem. the first line is exact the same code as used in the Training/Conference example you provide on this site. It is used in the Autocomplete fields.

    I’ve not used the split function which is used in the original version and that solves the problem.

    function parseDateFunc(a){
    // Set the desired format in the variable “f”
    var f = “dd/MM/yyyy HH:mm” , d = new Date(a);
    f = spjs.dffs.formatDate(d, f);
    return f.split(/ |:/);
    }

  • #23585

    Peter Giesselink
    Participant

    Testing the Training/Conference example I’ve encountered more problems is it okay to make a new topic?

  • #23679

    Paul Lynch
    Participant

    Hi Peter,

    Did you ever get this working?

    What is the Training/Conference example page where you wrote comments?

You must be logged in to reply to this topic.