Saturday, 8 July 2017

Calculate Age Based On BirthDate

function SetAge(birthdate) {
            var birthd = Xrm.Page.getAttribute("birthdate").getValue();
            if (birthd == null) {
                return;
            }
            var today = new Date().getFullYear();
            year1 = birthd.getFullYear();
            Xrm.Page.getAttribute("new_age").setValue(today - year1);
        }

No comments:

Post a Comment

React Hooks - custom Hook

  v CustomHook Ø React allows us to create our own hook which is known as custom hook. Example – 1 localStorage Demo Step-1 Create ...