question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dynamic id dropdown selector

See original GitHub issue

hello dalelotts, I have some problems when I try assign ‘id’ dinamically to data-datetimepicker-config: here’s my code

 <datetimepicker data-ng-model="RoadtripCtrl.date" 
data-datetimepicker-config="{ dropdownSelector: '#calendar-dropdown_{{$index}}',minView:'hour' }" data-on-set-time="RoadtripCtrl.selectTime(newDate, oldDate,property.id,$index)"></datetimepicker>

and here’s the error that throws: Error: Syntax error, unrecognized expression: #calendar-dropdown_{{$index}}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

8reactions
Kesidicommented, Apr 15, 2016

try data-datetimepicker-config="{ dropdownSelector: '#calendar-dropdown_' + $index, minView:'hour' }"

1reaction
dalelottscommented, May 20, 2017

@Karthik-Sundaramahalingam thanks for having a look!

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to add dynamic id on div based on the value of selected ...
Thanks for your answer,Its resolved,now I want to add dynamic id inside div based on selected option onchange,I updated the code. – carreankush....
Read more >
Dynamic HTML Select Drop Down List Using JavaScript
First, create a select tag with an id called countriesDropDown that you want to add the options dynamically inside.
Read more >
How to Create a Dynamic Dropdown Menu - Digioh Help Docs
First, get the dropdown ID and the selected option value from your browser's DevTools: And here, the selected option value: Every option has ......
Read more >
How to select an option from a dynamic dropdown in Cypress
How to select an option from a dynamic dropdown in Cypress: https://teachyourselftestautomation.comFollow My personal development growth ...
Read more >
How will I select dynamic ID? - Laracasts
With this I am getting an element id which is dynamic. I am creating this with jQuery. How will I select a class...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found