Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker With Dropdown can`t work #21

Closed
JhonMr opened this issue Apr 15, 2017 · 1 comment
Closed

DatePicker With Dropdown can`t work #21

JhonMr opened this issue Apr 15, 2017 · 1 comment

Comments

@JhonMr
Copy link

JhonMr commented Apr 15, 2017

I copy the code from official website,but it can`t dropdown the datepicker.
my code:

<template>  
  </div>
    <dropdown tag="div" class="form-group">
		  <div class="input-group">
		    <input class="form-control" type="text" v-model="date" readonly>
		    <div class="input-group-btn">
		      <button class="btn btn-default" type="button" data-role="trigger" >
		        <i class="glyphicon glyphicon-calendar"></i>
		      </button>
		    </div>
		  </div>
		  <ul slot="dropdown" class="dropdown-menu" >
		    <li>
		      <date-picker v-model="date"></date-picker>
		    </li>
		  </ul>
		</dropdown>
  </div>
</template>
<script>
import { Dropdown,Modal,DatePicker } from 'uiv'
export default {
  data () {
    return {
      date:'',
    }
  },
  created () {
  },
  methods: {
  },
  components:{
  	Dropdown,Modal,DatePicker,
  }
}
</script>
@wxsms
Copy link
Member

wxsms commented Apr 17, 2017

The dropdown data-role=trigger feature is curretly not able, will be fix on next release. pls use v-model to control the dropdown show / hide now.

<dropdown v-model="open">
  <button @click="open = !open" class="btn btn-default dropdown-toggle" type="button">
    <span>Dropdown</span>
    <span class="caret"></span>
  </button>
  <template slot="dropdown">
    <li><a role="button">Action</a></li>
    <li><a role="button">Another action</a></li>
    <li><a role="button">Something else here</a></li>
    <li role="separator" class="divider"></li>
    <li><a role="button">Separated link</a></li>
  </template>
</dropdown>

@wxsms wxsms closed this as completed Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants