locked
Comparition and condition cant work RRS feed

  • Question

  • myapp.Home.WhoIsHereTemplate_postRender = function (element, contentItem) {
        if (contentItem.value.Room == null && contentItem.value.CheckIn < Date.now) {
            $(element).css("background", "red");
            $(element).css("color", "#ffffff");
         }
    };
    I do not know why but this comparison does not work
    Wednesday, April 2, 2014 11:53 PM

Answers

  •  old school never fails
    
    var Today = new Date(Date.now());
        var D = Today.getDate();
        var M = Today.getMonth() + 1;
        var Y = Today.getFullYear();
    
        screen.TodayDate = M + "/" + D + "/" + Y;

    • Marked as answer by Vizaint Thursday, April 3, 2014 8:35 PM
    Thursday, April 3, 2014 8:35 PM

All replies

  •  old school never fails
    
    var Today = new Date(Date.now());
        var D = Today.getDate();
        var M = Today.getMonth() + 1;
        var Y = Today.getFullYear();
    
        screen.TodayDate = M + "/" + D + "/" + Y;

    • Marked as answer by Vizaint Thursday, April 3, 2014 8:35 PM
    Thursday, April 3, 2014 8:35 PM
  • Glad that you've solved this issue by yourself, Vizaint. Thanks for sharing your solution with us. :)

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 4, 2014 3:20 AM