123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="calendar__wrap">
<div class="calendar jan open">
        <h3 class="calendar__mounth-title">Январь</h3>
        <ul class="calendar__week">
            <li class="calendar__week-day">пн</li>
            <li class="calendar__week-day">вт</li>
            <li class="calendar__week-day">ср</li>
            <li class="calendar__week-day">чт</li>
            <li class="calendar__week-day">пт</li>
            <li class="calendar__week-day">сб</li>
            <li class="calendar__week-day">вс</li>
        </ul>
        <ul class="calendar__mounth-list">
            <input type="checkbox" name="day" form="form" id="dayj1" class="day" style="display: none" >
            <label for="dayj1" class="calendar__mounth-day">1</label>
            <input type="checkbox" name="day" form="form" id="dayj2" class="day" style="display: none">
            <label for="dayj2" class="calendar__mounth-day">2</label>
            <input type="checkbox" name="day" form="form" id="dayj3" class="day" style="display: none">
            <label for="dayj3" class="calendar__mounth-day">3</label>
            <input type="checkbox" name="day" form="form" id="dayj4" class="day" style="display: none">
            <label for="dayj4" class="calendar__mounth-day">4</label>
            <input type="checkbox" name="day" form="form" id="dayj5" class="day" style="display: none">
            <label for="dayj5" class="calendar__mounth-day">5</label>
            <input type="checkbox" name="day" form="form" id="dayj6" class="day" style="display: none">
            <label for="dayj6" class="calendar__mounth-day">6</label>
            <input type="checkbox" name="day" form="form" id="dayj7" class="day" style="display: none">
            <label for="dayj7" class="calendar__mounth-day">7</label>
            <input type="checkbox" name="day" form="form" id="dayj8" class="day" style="display: none">
            <label for="dayj8" class="calendar__mounth-day">8</label>
            <input type="checkbox" name="day" form="form" id="dayj9" class="day" style="display: none">
            <label for="dayj9" class="calendar__mounth-day">9</label>
            <input type="checkbox" name="day" form="form" id="dayj10" class="day" style="display: none">
            <label for="dayj10" class="calendar__mounth-day">10</label>
            <input type="checkbox" name="day" form="form" id="dayj11" class="day" style="display: none">
            <label for="dayj11" class="calendar__mounth-day">11</label>
            <input type="checkbox" name="day" form="form" id="dayj12" class="day" style="display: none">
            <label for="dayj12" class="calendar__mounth-day">12</label>
            <input type="checkbox" name="day" form="form" id="dayj13" class="day" style="display: none">
            <label for="dayj13" class="calendar__mounth-day">13</label>
            <input type="checkbox" name="day" form="form" id="dayj14" class="day" style="display: none">
            <label for="dayj14" class="calendar__mounth-day">14</label>
            <input type="checkbox" name="day" form="form" id="dayj15" class="day" style="display: none">
            <label for="dayj15" class="calendar__mounth-day">15</label>
            <input type="checkbox" name="day" form="form" id="dayj16" class="day" style="display: none">
            <label for="dayj16" class="calendar__mounth-day">16</label>
            <input type="checkbox" name="day" form="form" id="dayj17" class="day" style="display: none">
            <label for="dayj17" class="calendar__mounth-day">17</label>
            <input type="checkbox" name="day" form="form" id="dayj18" class="day" style="display: none">
            <label for="dayj18" class="calendar__mounth-day">18</label>
            <input type="checkbox" name="day" form="form" id="dayj19" class="day" style="display: none">
            <label for="dayj19" class="calendar__mounth-day">19</label>
            <input type="checkbox" name="day" form="form" id="dayj20" class="day" style="display: none">
            <label for="dayj20" class="calendar__mounth-day">20</label>
            <input type="checkbox" name="day" form="form" id="dayj21" class="day" style="display: none">
            <label for="dayj21" class="calendar__mounth-day">21</label>
            <input type="checkbox" name="day" form="form" id="dayj22" class="day" style="display: none">
            <label for="dayj22" class="calendar__mounth-day">22</label>
            <input type="checkbox" name="day" form="form" id="dayj23" class="day" style="display: none">
            <label for="dayj23" class="calendar__mounth-day">23</label>
            <input type="checkbox" name="day" form="form" id="dayj24" class="day" style="display: none">
            <label for="dayj24" class="calendar__mounth-day">24</label>
            <input type="checkbox" name="day" form="form" id="dayj25" class="day" style="display: none">
            <label for="dayj25" class="calendar__mounth-day">25</label>
            <input type="checkbox" name="day" form="form" id="dayj26" class="day" style="display: none">
            <label for="dayj26" class="calendar__mounth-day">26</label>
            <input type="checkbox" name="day" form="form" id="dayj27" class="day" style="display: none">
            <label for="dayj27" class="calendar__mounth-day">27</label>
            <input type="checkbox" name="day" form="form" id="dayj28" class="day" style="display: none">
            <label for="dayj28" class="calendar__mounth-day">28</label>
            <input type="checkbox" name="day" form="form" id="dayj29" class="day" style="display: none">
            <label for="dayj29" class="calendar__mounth-day">29</label>
            <input type="checkbox" name="day" form="form" id="dayj30" class="day" style="display: none">
            <label for="dayj30" class="calendar__mounth-day">30</label>
            <input type="checkbox" name="day" form="form" id="dayj31" class="day" style="display: none">
            <label for="dayj31" class="calendar__mounth-day">31</label>
        </ul>
        </div>

 <div class="calendar jan open">
        <h3 class="calendar__mounth-title">Январь</h3>
        <ul class="calendar__week">
            <li class="calendar__week-day">пн</li>
            <li class="calendar__week-day">вт</li>
            <li class="calendar__week-day">ср</li>
            <li class="calendar__week-day">чт</li>
            <li class="calendar__week-day">пт</li>
            <li class="calendar__week-day">сб</li>
            <li class="calendar__week-day">вс</li>
        </ul>
        <ul class="calendar__mounth-list">
            <input type="checkbox" name="day" form="form" id="dayj1" class="day" style="display: none" >
            <label for="dayj1" class="calendar__mounth-day">1</label>
            <input type="checkbox" name="day" form="form" id="dayj2" class="day" style="display: none">
            <label for="dayj2" class="calendar__mounth-day">2</label>
            <input type="checkbox" name="day" form="form" id="dayj3" class="day" style="display: none">
            <label for="dayj3" class="calendar__mounth-day">3</label>
            <input type="checkbox" name="day" form="form" id="dayj4" class="day" style="display: none">
            <label for="dayj4" class="calendar__mounth-day">4</label>
            <input type="checkbox" name="day" form="form" id="dayj5" class="day" style="display: none">
            <label for="dayj5" class="calendar__mounth-day">5</label>
            <input type="checkbox" name="day" form="form" id="dayj6" class="day" style="display: none">
            <label for="dayj6" class="calendar__mounth-day">6</label>
            <input type="checkbox" name="day" form="form" id="dayj7" class="day" style="display: none">
            <label for="dayj7" class="calendar__mounth-day">7</label>
            <input type="checkbox" name="day" form="form" id="dayj8" class="day" style="display: none">
            <label for="dayj8" class="calendar__mounth-day">8</label>
            <input type="checkbox" name="day" form="form" id="dayj9" class="day" style="display: none">
            <label for="dayj9" class="calendar__mounth-day">9</label>
            <input type="checkbox" name="day" form="form" id="dayj10" class="day" style="display: none">
            <label for="dayj10" class="calendar__mounth-day">10</label>
            <input type="checkbox" name="day" form="form" id="dayj11" class="day" style="display: none">
            <label for="dayj11" class="calendar__mounth-day">11</label>
            <input type="checkbox" name="day" form="form" id="dayj12" class="day" style="display: none">
            <label for="dayj12" class="calendar__mounth-day">12</label>
            <input type="checkbox" name="day" form="form" id="dayj13" class="day" style="display: none">
            <label for="dayj13" class="calendar__mounth-day">13</label>
            <input type="checkbox" name="day" form="form" id="dayj14" class="day" style="display: none">
            <label for="dayj14" class="calendar__mounth-day">14</label>
            <input type="checkbox" name="day" form="form" id="dayj15" class="day" style="display: none">
            <label for="dayj15" class="calendar__mounth-day">15</label>
            <input type="checkbox" name="day" form="form" id="dayj16" class="day" style="display: none">
            <label for="dayj16" class="calendar__mounth-day">16</label>
            <input type="checkbox" name="day" form="form" id="dayj17" class="day" style="display: none">
            <label for="dayj17" class="calendar__mounth-day">17</label>
            <input type="checkbox" name="day" form="form" id="dayj18" class="day" style="display: none">
            <label for="dayj18" class="calendar__mounth-day">18</label>
            <input type="checkbox" name="day" form="form" id="dayj19" class="day" style="display: none">
            <label for="dayj19" class="calendar__mounth-day">19</label>
            <input type="checkbox" name="day" form="form" id="dayj20" class="day" style="display: none">
            <label for="dayj20" class="calendar__mounth-day">20</label>
            <input type="checkbox" name="day" form="form" id="dayj21" class="day" style="display: none">
            <label for="dayj21" class="calendar__mounth-day">21</label>
            <input type="checkbox" name="day" form="form" id="dayj22" class="day" style="display: none">
            <label for="dayj22" class="calendar__mounth-day">22</label>
            <input type="checkbox" name="day" form="form" id="dayj23" class="day" style="display: none">
            <label for="dayj23" class="calendar__mounth-day">23</label>
            <input type="checkbox" name="day" form="form" id="dayj24" class="day" style="display: none">
            <label for="dayj24" class="calendar__mounth-day">24</label>
            <input type="checkbox" name="day" form="form" id="dayj25" class="day" style="display: none">
            <label for="dayj25" class="calendar__mounth-day">25</label>
            <input type="checkbox" name="day" form="form" id="dayj26" class="day" style="display: none">
            <label for="dayj26" class="calendar__mounth-day">26</label>
            <input type="checkbox" name="day" form="form" id="dayj27" class="day" style="display: none">
            <label for="dayj27" class="calendar__mounth-day">27</label>
            <input type="checkbox" name="day" form="form" id="dayj28" class="day" style="display: none">
            <label for="dayj28" class="calendar__mounth-day">28</label>
            <input type="checkbox" name="day" form="form" id="dayj29" class="day" style="display: none">
            <label for="dayj29" class="calendar__mounth-day">29</label>
            <input type="checkbox" name="day" form="form" id="dayj30" class="day" style="display: none">
            <label for="dayj30" class="calendar__mounth-day">30</label>
            <input type="checkbox" name="day" form="form" id="dayj31" class="day" style="display: none">
            <label for="dayj31" class="calendar__mounth-day">31</label>
        </ul>
        </div>
 <div class="calendar jan open">
        <h3 class="calendar__mounth-title">Январь</h3>
        <ul class="calendar__week">
            <li class="calendar__week-day">пн</li>
            <li class="calendar__week-day">вт</li>
            <li class="calendar__week-day">ср</li>
            <li class="calendar__week-day">чт</li>
            <li class="calendar__week-day">пт</li>
            <li class="calendar__week-day">сб</li>
            <li class="calendar__week-day">вс</li>
        </ul>
        <ul class="calendar__mounth-list">
            <input type="checkbox" name="day" form="form" id="dayj1" class="day" style="display: none" >
            <label for="dayj1" class="calendar__mounth-day">1</label>
            <input type="checkbox" name="day" form="form" id="dayj2" class="day" style="display: none">
            <label for="dayj2" class="calendar__mounth-day">2</label>
            <input type="checkbox" name="day" form="form" id="dayj3" class="day" style="display: none">
            <label for="dayj3" class="calendar__mounth-day">3</label>
            <input type="checkbox" name="day" form="form" id="dayj4" class="day" style="display: none">
            <label for="dayj4" class="calendar__mounth-day">4</label>
            <input type="checkbox" name="day" form="form" id="dayj5" class="day" style="display: none">
            <label for="dayj5" class="calendar__mounth-day">5</label>
            <input type="checkbox" name="day" form="form" id="dayj6" class="day" style="display: none">
            <label for="dayj6" class="calendar__mounth-day">6</label>
            <input type="checkbox" name="day" form="form" id="dayj7" class="day" style="display: none">
            <label for="dayj7" class="calendar__mounth-day">7</label>
            <input type="checkbox" name="day" form="form" id="dayj8" class="day" style="display: none">
            <label for="dayj8" class="calendar__mounth-day">8</label>
            <input type="checkbox" name="day" form="form" id="dayj9" class="day" style="display: none">
            <label for="dayj9" class="calendar__mounth-day">9</label>
            <input type="checkbox" name="day" form="form" id="dayj10" class="day" style="display: none">
            <label for="dayj10" class="calendar__mounth-day">10</label>
            <input type="checkbox" name="day" form="form" id="dayj11" class="day" style="display: none">
            <label for="dayj11" class="calendar__mounth-day">11</label>
            <input type="checkbox" name="day" form="form" id="dayj12" class="day" style="display: none">
            <label for="dayj12" class="calendar__mounth-day">12</label>
            <input type="checkbox" name="day" form="form" id="dayj13" class="day" style="display: none">
            <label for="dayj13" class="calendar__mounth-day">13</label>
            <input type="checkbox" name="day" form="form" id="dayj14" class="day" style="display: none">
            <label for="dayj14" class="calendar__mounth-day">14</label>
            <input type="checkbox" name="day" form="form" id="dayj15" class="day" style="display: none">
            <label for="dayj15" class="calendar__mounth-day">15</label>
            <input type="checkbox" name="day" form="form" id="dayj16" class="day" style="display: none">
            <label for="dayj16" class="calendar__mounth-day">16</label>
            <input type="checkbox" name="day" form="form" id="dayj17" class="day" style="display: none">
            <label for="dayj17" class="calendar__mounth-day">17</label>
            <input type="checkbox" name="day" form="form" id="dayj18" class="day" style="display: none">
            <label for="dayj18" class="calendar__mounth-day">18</label>
            <input type="checkbox" name="day" form="form" id="dayj19" class="day" style="display: none">
            <label for="dayj19" class="calendar__mounth-day">19</label>
            <input type="checkbox" name="day" form="form" id="dayj20" class="day" style="display: none">
            <label for="dayj20" class="calendar__mounth-day">20</label>
            <input type="checkbox" name="day" form="form" id="dayj21" class="day" style="display: none">
            <label for="dayj21" class="calendar__mounth-day">21</label>
            <input type="checkbox" name="day" form="form" id="dayj22" class="day" style="display: none">
            <label for="dayj22" class="calendar__mounth-day">22</label>
            <input type="checkbox" name="day" form="form" id="dayj23" class="day" style="display: none">
            <label for="dayj23" class="calendar__mounth-day">23</label>
            <input type="checkbox" name="day" form="form" id="dayj24" class="day" style="display: none">
            <label for="dayj24" class="calendar__mounth-day">24</label>
            <input type="checkbox" name="day" form="form" id="dayj25" class="day" style="display: none">
            <label for="dayj25" class="calendar__mounth-day">25</label>
            <input type="checkbox" name="day" form="form" id="dayj26" class="day" style="display: none">
            <label for="dayj26" class="calendar__mounth-day">26</label>
            <input type="checkbox" name="day" form="form" id="dayj27" class="day" style="display: none">
            <label for="dayj27" class="calendar__mounth-day">27</label>
            <input type="checkbox" name="day" form="form" id="dayj28" class="day" style="display: none">
            <label for="dayj28" class="calendar__mounth-day">28</label>
            <input type="checkbox" name="day" form="form" id="dayj29" class="day" style="display: none">
            <label for="dayj29" class="calendar__mounth-day">29</label>
            <input type="checkbox" name="day" form="form" id="dayj30" class="day" style="display: none">
            <label for="dayj30" class="calendar__mounth-day">30</label>
            <input type="checkbox" name="day" form="form" id="dayj31" class="day" style="display: none">
            <label for="dayj31" class="calendar__mounth-day">31</label>
        </ul>
        </div>
</div>
            
          
!
            
              *
 margin: 0
 padding: 0
.calendar__wrap
 display: flex
 justify-content: space-between
 width: 800px

.calendar
 margin-bottom: 16px

 width: 185px

 border: 1px solid #77b97e

 border-radius: 5px

 background-color: #ebf5ec

.calendar__mounth-title
 position: relative

 margin-top: 9px
 margin-bottom: 18px

 color: #1d6739

 text-align: center
 &:after
  content: ''

  width: 124px
  height: 1px

  background-color: #8d978e 

  position: absolute
  left: 50%
  margin-left: -62px
  bottom: -7px

.calendar__week
 list-style: none

 margin: 0 auto
 margin-bottom: 7px

 display: flex
 justify-content: space-between

 width: 152px

 font-family: 'Ubuntu'
 
 text-align: center

.calendar__week-day
 display: flex
 text-align: center
 justify-content: space-around

 background-color: #fff
 
 width: 20px 
 height: 20px

 font-size: 14px
 color: #1d6739
 font-weight: 500
 &:nth-child(6)
  background-color: #e2907a 
  color: #fff
 &:nth-child(7)
  background-color: #e2907a 
  color: #fff

.calendar__mounth-list
 list-style: none 

 margin: 0 auto
 margin-bottom: 17px
 
 display: flex
 flex-wrap: wrap 

 font-family: 'Ubuntu'

 width: 152px 

 text-align: center

.calendar__mounth-day
 display: flex
 justify-content: space-around 
 align-items: center

 margin-left: 2px
 margin-bottom: 2px

 width: 20px 
 height: 20px 
 
 font-size: 14px
 font-weight: 500
 color: #227947

 background-color: #fff
 
 cursor: pointer
 &:hover
  background-color: #c5eac9
  color: #fff
 &:nth-child(2)
  margin-left: 0
 &:nth-child(16)
  margin-left: 0
 &:nth-child(30)
  margin-left: 0
 &:nth-child(44)
  margin-left: 0
 &:nth-child(58)
  margin-left: 0

.active
 background-color: #77b97e
 color: #fff
            
          
!
            
              document.addEventListener('click', function(e) {
    if (e.target.classList.contains('calendar__mounth-day')) {
      e.target.classList.toggle('active');
    }
  });


var checkbox = document.getElementsByClassName('day')
var day = document.getElementsByClassName('calendar__mounth-day')

if (localStorage.getItem('checked') !== null) {
    checkbox[0].getAttribute(localStorage.getItem('checked'))
    day[0].classList.add(localStorage.getItem('toggle'))
}

document.addEventListener('change', function(e) {
    if (e.target.classList.contains('day')) {
        if (localStorage.getItem('checked') == null) {
            localStorage.setItem('checked','checked')
            localStorage.setItem('toggle','active')
        } else if ((localStorage.getItem('checked' ) !== null)) {
            localStorage.removeItem('checked','checked')
            localStorage.removeItem('toggle','active')
        }
    }
  });
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console