el-date-picker sets default-value only to the year and month, and the day cannot be highlightedHandle methods differently in Vue depending on mobile or nothow can I make this specific format with momentHow to Set minimum and maximum date dynamically in Element-ui date pickerElement-UI how to set default filter value in column filtersVueJs + Element UI: How to set default value with photo el-select?how to set the default date of the day in vue jsVueJs - el-date-picker : How to set format default value new Date()How do I account for leap years and months with 30 days in custom date picker drop downs?How do I make the element UI time picker set value only after the ok button is clicked?

How to get all months in a query where one month has no matches?

Using font to highlight a god's speech in dialogue

How to disambiguate between various meditation practices?

Informed Consent Research Question

Received email from ISP saying one of my devices has malware

What is the most likely cause of short, quick, and useless reviews?

Are manifolds admitting a circle foliation covered by manifolds with a (non-trivial) circle action?

Is it safe for a student to give negative feedback in student evaluations?

Why didn't Thatcher give Hong Kong to Taiwan?

How does Harry wear the invisibility cloak?

Solve this icositetragram

Which is the best password hashing algorithm in .NET Core?

Error: Method does not exist or incorrect signature: void get(String) from the type Object

How to run a command 1 out of N times in Bash

Is torque as fundamental a concept as force?

What percentage of the mass/energy of the universe is in the form of electromagnetic waves?

Why are Latin and Sanskrit called dead languages?

Taking the first element in a list of associations

Initializing a std::array with a constant value

Remove ads in Viber for PC

What is this red bug infesting some trees in southern Germany?

How is total raw calculated for Science Pack 2?

In chocolate terminology, what is the name of thinly sliced leaf-shaped toppings made from hot, smooth chocolate, used to form flower petals?

Were the women of Travancore, India, taxed for covering their breasts by breast size?



el-date-picker sets default-value only to the year and month, and the day cannot be highlighted


Handle methods differently in Vue depending on mobile or nothow can I make this specific format with momentHow to Set minimum and maximum date dynamically in Element-ui date pickerElement-UI how to set default filter value in column filtersVueJs + Element UI: How to set default value with photo el-select?how to set the default date of the day in vue jsVueJs - el-date-picker : How to set format default value new Date()How do I account for leap years and months with 30 days in custom date picker drop downs?How do I make the element UI time picker set value only after the ok button is clicked?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am using el-date-picker component,my expectation is to using :default- value to set the default highlight date to a specified date instead of current local date.
but the fact is the drop-down box can locate to 2019-02 ,and the expected date is not highlighted, what is wrong here?



<el-date-picker
v-model="value8"
type="date"
placeholder="Pick a date"
:default-value="defaultDate">




data() 
return
defaultDate: new Date('2019-02-22')



see my jsfiddle:https://jsfiddle.net/48ehxz9n/










share|improve this question






























    1















    I am using el-date-picker component,my expectation is to using :default- value to set the default highlight date to a specified date instead of current local date.
    but the fact is the drop-down box can locate to 2019-02 ,and the expected date is not highlighted, what is wrong here?



    <el-date-picker
    v-model="value8"
    type="date"
    placeholder="Pick a date"
    :default-value="defaultDate">




    data() 
    return
    defaultDate: new Date('2019-02-22')



    see my jsfiddle:https://jsfiddle.net/48ehxz9n/










    share|improve this question


























      1












      1








      1








      I am using el-date-picker component,my expectation is to using :default- value to set the default highlight date to a specified date instead of current local date.
      but the fact is the drop-down box can locate to 2019-02 ,and the expected date is not highlighted, what is wrong here?



      <el-date-picker
      v-model="value8"
      type="date"
      placeholder="Pick a date"
      :default-value="defaultDate">




      data() 
      return
      defaultDate: new Date('2019-02-22')



      see my jsfiddle:https://jsfiddle.net/48ehxz9n/










      share|improve this question














      I am using el-date-picker component,my expectation is to using :default- value to set the default highlight date to a specified date instead of current local date.
      but the fact is the drop-down box can locate to 2019-02 ,and the expected date is not highlighted, what is wrong here?



      <el-date-picker
      v-model="value8"
      type="date"
      placeholder="Pick a date"
      :default-value="defaultDate">




      data() 
      return
      defaultDate: new Date('2019-02-22')



      see my jsfiddle:https://jsfiddle.net/48ehxz9n/







      vue.js vuejs2 element-ui






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 2:12









      carmelo zhangcarmelo zhang

      223 bronze badges




      223 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          0















          For some reason, the styles do not have a definition for the class default, and this is the reason to open the issue. As an auxiliary solution, add a definition manually:



          .el-date-table td.default span 
          color: #409eff;
          font-weight: 700;



          [ https://jsfiddle.net/7cw5rz3u/ ]






          share|improve this answer
































            0















            You can set the selected date to the default date if you are expecting that is to be highlighted on click of date time picker



            html







            <div id="app">
            <template>
            <div class="block">
            <span class="demonstration">date</span>
            <el-date-picker
            v-model="selectedDate"
            type="date"
            placeholder="Pick a date"
            :default-value="defaultDate">
            </el-date-picker>
            defaultDate |
            selectedDate
            </div>
            </template>
            </div>


            JS



            var Main = 
            data()
            return
            selectedDate: new Date('2019-02-22'),
            defaultDate: new Date('2019-02-22')



            var Ctor = Vue.extend(Main)
            new Ctor().$mount('#app')





            share|improve this answer



























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389189%2fel-date-picker-sets-default-value-only-to-the-year-and-month-and-the-day-cannot%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0















              For some reason, the styles do not have a definition for the class default, and this is the reason to open the issue. As an auxiliary solution, add a definition manually:



              .el-date-table td.default span 
              color: #409eff;
              font-weight: 700;



              [ https://jsfiddle.net/7cw5rz3u/ ]






              share|improve this answer





























                0















                For some reason, the styles do not have a definition for the class default, and this is the reason to open the issue. As an auxiliary solution, add a definition manually:



                .el-date-table td.default span 
                color: #409eff;
                font-weight: 700;



                [ https://jsfiddle.net/7cw5rz3u/ ]






                share|improve this answer



























                  0














                  0










                  0









                  For some reason, the styles do not have a definition for the class default, and this is the reason to open the issue. As an auxiliary solution, add a definition manually:



                  .el-date-table td.default span 
                  color: #409eff;
                  font-weight: 700;



                  [ https://jsfiddle.net/7cw5rz3u/ ]






                  share|improve this answer













                  For some reason, the styles do not have a definition for the class default, and this is the reason to open the issue. As an auxiliary solution, add a definition manually:



                  .el-date-table td.default span 
                  color: #409eff;
                  font-weight: 700;



                  [ https://jsfiddle.net/7cw5rz3u/ ]







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 28 at 4:32









                  stdob--stdob--

                  21.5k4 gold badges38 silver badges53 bronze badges




                  21.5k4 gold badges38 silver badges53 bronze badges


























                      0















                      You can set the selected date to the default date if you are expecting that is to be highlighted on click of date time picker



                      html







                      <div id="app">
                      <template>
                      <div class="block">
                      <span class="demonstration">date</span>
                      <el-date-picker
                      v-model="selectedDate"
                      type="date"
                      placeholder="Pick a date"
                      :default-value="defaultDate">
                      </el-date-picker>
                      defaultDate |
                      selectedDate
                      </div>
                      </template>
                      </div>


                      JS



                      var Main = 
                      data()
                      return
                      selectedDate: new Date('2019-02-22'),
                      defaultDate: new Date('2019-02-22')



                      var Ctor = Vue.extend(Main)
                      new Ctor().$mount('#app')





                      share|improve this answer





























                        0















                        You can set the selected date to the default date if you are expecting that is to be highlighted on click of date time picker



                        html







                        <div id="app">
                        <template>
                        <div class="block">
                        <span class="demonstration">date</span>
                        <el-date-picker
                        v-model="selectedDate"
                        type="date"
                        placeholder="Pick a date"
                        :default-value="defaultDate">
                        </el-date-picker>
                        defaultDate |
                        selectedDate
                        </div>
                        </template>
                        </div>


                        JS



                        var Main = 
                        data()
                        return
                        selectedDate: new Date('2019-02-22'),
                        defaultDate: new Date('2019-02-22')



                        var Ctor = Vue.extend(Main)
                        new Ctor().$mount('#app')





                        share|improve this answer



























                          0














                          0










                          0









                          You can set the selected date to the default date if you are expecting that is to be highlighted on click of date time picker



                          html







                          <div id="app">
                          <template>
                          <div class="block">
                          <span class="demonstration">date</span>
                          <el-date-picker
                          v-model="selectedDate"
                          type="date"
                          placeholder="Pick a date"
                          :default-value="defaultDate">
                          </el-date-picker>
                          defaultDate |
                          selectedDate
                          </div>
                          </template>
                          </div>


                          JS



                          var Main = 
                          data()
                          return
                          selectedDate: new Date('2019-02-22'),
                          defaultDate: new Date('2019-02-22')



                          var Ctor = Vue.extend(Main)
                          new Ctor().$mount('#app')





                          share|improve this answer













                          You can set the selected date to the default date if you are expecting that is to be highlighted on click of date time picker



                          html







                          <div id="app">
                          <template>
                          <div class="block">
                          <span class="demonstration">date</span>
                          <el-date-picker
                          v-model="selectedDate"
                          type="date"
                          placeholder="Pick a date"
                          :default-value="defaultDate">
                          </el-date-picker>
                          defaultDate |
                          selectedDate
                          </div>
                          </template>
                          </div>


                          JS



                          var Main = 
                          data()
                          return
                          selectedDate: new Date('2019-02-22'),
                          defaultDate: new Date('2019-02-22')



                          var Ctor = Vue.extend(Main)
                          new Ctor().$mount('#app')






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 28 at 7:52









                          Tony TomTony Tom

                          5223 silver badges10 bronze badges




                          5223 silver badges10 bronze badges






























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389189%2fel-date-picker-sets-default-value-only-to-the-year-and-month-and-the-day-cannot%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                              Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript