function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VRKVRK 

when select checkbox is True then update date in aura controller

Hi folks,
my requirment is :
When checkbox is selected, then update Date format in lighitng aura component.
component.set("v.SFYI",ShortFirst);   // SFYI is aura boolean attribute 
      var SFYI = component.get("v.SFYI");
       // alert(SFYI);   // when checkbox selected , alert display True value
if(SFYI == "true") {    /////Here checkbox code is not working 
              var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
              component.set('v.today', today);
               component.set("v.date",today);
            }

Issues getting:
if(SFYI == true) is not working  ,when checkbox is True, but its this line is not executing.
And
my requirement is , when checkbox is True , immediatlty date should be 1231
can you pls assist on this 
Thanks
VRK

sfdcBahusfdcBahu
Please post the code of what you tried, that would be helpful for people to answer