Copied to clipboard

Flag this post as spam?

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


  • ianhoughton 281 posts 605 karma points c-trib
    Jan 19, 2016 @ 11:04
    ianhoughton
    0

    Datepicker on change event

    I have the standard datetimepicker displayed in my custom section using this html:

    <umb-control-group label="Publish Date" description="The RSS publish date">
           <umb-editor model="datepicker"></umb-editor>
    </umb-control-group>
    

    This is how i setup the config for the datepicker:

    $scope.datepicker = {
        view: 'datepicker',
        config: {
            pickDate: true,
            pickTime: true,
            useSeconds: true,
            pick12HourFormat: false,
            format: "DD/MM/YYYY HH:mm:ss"
        },
        value: date
    };
    

    and I have a $watch event on the datepicker:

    $scope.$watch('datepicker', function () {
       if ($scope.datepicker != undefined && $scope.loaded) {
           $scope.form.PubDate = $scope.datepicker.value;
       }
    }, true);
    

    For the life of me, I can't seem to grab the new value from the datepicker, the datepicker.value value never seems to get updated?

  • Elliot Spaull 8 posts 55 karma points
    Feb 09, 2016 @ 17:22
    Elliot Spaull
    0

    Did you manage to get this working? I'm struggling with the same problem right now!

  • ianhoughton 281 posts 605 karma points c-trib
    Feb 09, 2016 @ 18:32
    ianhoughton
    0

    Not at the moment sorry, I had to move onto something else :(

  • Elliot Spaull 8 posts 55 karma points
    Feb 10, 2016 @ 09:25
    Elliot Spaull
    0

    No worries, I'll keep at it for a while and let you know if I manage to get it working.

Please Sign in or register to post replies

Write your reply to:

Draft