ng2-ui / datetime-picker

Angular2 DateTime Picker
https://ng2-ui.github.io/#/datetime-picker
MIT License
121 stars 62 forks source link

making width:100% #49

Closed yadbo closed 7 years ago

yadbo commented 7 years ago

Hello people,

I'm trying to make the width:100% of my datetime-picker. Is that even possible, any work arounds? Whatever I do it's still changing it's size. Even tried with JQuery.

Regards yadbo

allenhwkim commented 7 years ago

You can override the existing style. However, why would you do that?

  .ng2-datetime-picker {
    width: 100%;
  }
  datetime-picker {
    width: 100% !important;
  }
  .datetime-picker {
    width: 100%;
  }

https://plnkr.co/edit/jszLFz?p=preview

yadbo commented 7 years ago

Hello @allenhwkim, it still doesnt work... I'm using this with bootstrap so I want it to fill the column. Can you please help me out here? When I load the page it's 100% but when I click the input field it's changing it's size.

allenhwkim commented 7 years ago

It works for me as you see in plunker. You need to create a plunker if you really want me to help. Without it, I don't know what does not work. Without it, I will close this issue.

yadbo commented 7 years ago

But in your plunker example you set the width to 100% of you the datepicker field where I can choose the date. But I want my input field to be width :100%. Can you try me to help me again via code? Otherwise I'll try to open a plunker project (I never did it before)

allenhwkim commented 7 years ago

Closing it. I need to see your code. Please create an plunker, jsfiddle, or any working example.

yadbo commented 7 years ago

Hello again, finally weekend. I don't need a plunker. We can use your code, you have the same problem there as I can see. Look, I want the input field to be width:100%; not the panel where I choose the date. I think you didn't understand me.

allenhwkim commented 7 years ago

No, I don't understand you. https://plnkr.co/edit/3QoCbVeOeWqRx4F9Xa4e?p=preview

This makes input 100%;

    .ng2-datetime-picker {
      width: 100%;
    }