Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jake williamson 207 posts 873 karma points
    Mar 03, 2015 @ 12:11
    jake williamson
    0

    formatting issue using the umbraco date picker in a custom property editor

    hey out there,

    we've run into bit of a problem using the umbraco date picker in a custom property editor that we're using in the back office.

    everything loads correctly:

    initial load

    but when we select today's date, the format comes out incorrectly:

    incorrect date format

    if we choose a date other than today's date, it appears to be happy:

    any other date

    this is the js we're using in our controller:

    $scope.fromDate = {
        view: 'datepicker',
        config: {
            pickDate: true,
            pickTime: false,
            pick12HourFormat: false,
            format: 'yyyy-mm-dd'
        }
    };
    

    any ideas as to why today's date would be causing such an issue?!

    cheers,

    jake

  • Julio M. Vivas 61 posts 122 karma points
    Apr 21, 2015 @ 11:50
    Julio M. Vivas
    0

    Hi Jake

    You've probably figured this out by now but make the format string all caps and it should work:

    $scope.fromDate ={
        view
    :'datepicker',
        config
    :{
            pickDate
    :true,
            pickTime
    :false,
            pick12HourFormat
    :false,
            format
    :'YYYY-MM-DD'
       
    }
    };

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies