OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

react-date-range labels for ranges

  • Thread starter Thread starter Rey
  • Start date Start date
R

Rey

Guest
Curious how I can add labels to the date ranges when there are multiple. I.e. I would like to write "Outer Date Range" above/next to the first range and "Inner Date Range" above/next to the second range.

Code:
                <DateRangePicker
                    minDate={new Date(data.deployment.travelStartDate)}
                    maxDate={new Date(data.deployment.travelEndDate)}
                    onChange={handleSelect}
                    ranges={ranges}
                    rangeColors={rangeColors}
                    shownDate={new Date(data.deployment.startDate)}
                    staticRanges={[]}
                    inputRanges={[]}
                />

enter image description here

<p>Curious how I can add labels to the date ranges when there are multiple. I.e. I would like to write "Outer Date Range" above/next to the first range and "Inner Date Range" above/next to the second range.</p>
<pre><code> <DateRangePicker
minDate={new Date(data.deployment.travelStartDate)}
maxDate={new Date(data.deployment.travelEndDate)}
onChange={handleSelect}
ranges={ranges}
rangeColors={rangeColors}
shownDate={new Date(data.deployment.startDate)}
staticRanges={[]}
inputRanges={[]}
/>
</code></pre>
<p><a href="https://i.sstatic.net/pCusMufg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pCusMufg.png" alt="enter image description here" /></a></p>
 

Latest posts

Top