Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Find An Element


function App ()
{


  let customDatesStyles = [];
  let startDate = moment();
 
  let dates = ["2022-10-17", "2022-10-18"];

  for(var i in dates)
   { customDatesStyles.push({
        startDate: moment(dates[i]),
        dateNameStyle: styles.dateNameStyle,
        dateNumberStyle: styles.dateNumberStyle,
        // Random color...
        dateContainerStyle: { backgroundColor: "green" },
      });

    }
function change(da)
 { console.log(customDatesStyles[0].startDate);
  console.log(da);
  console.log(customDatesStyles.findIndex((el)=> el.startDate.format("YYYY-MM-DD") == da.format("YYYY-MM-DD")));

 }
 
PREVIOUS NEXT
Tagged: #Find #An #Element
ADD COMMENT
Topic
Name
4+7 =