all
I'm trying to use md-current-view with md-datepicker. But it doesn't work.
Ultimately, I want to select months on a year-view without a choice of days.
My code:
<md-datepicker
md-current-view = "year"
datepicker-iso-date-format
ng-model="viewedDate"
md-placeholder="Enter date"
name="firstDatapicker"
class="only-icon md-primary select-time-range"
ng-change="selectMonthDatapicker(viewedDate)"
ng-click="selectDate($event)">
</md-datepicker>
Thanks in advance guys.
Related
I have this code on a website
<div id="productPriceJSON_18678511" style="display:none;">
[{
"isXPromoProd":"true",
"mfPartNumber":"961576-BLACK",
"productGroupId":"18678008",
"productId" : "18678511",
"listPrice" :"$85.00",
"offerPrice" :"$85.00",
"discountPrice" :"$42.50",
"lowestPriceAmount" :"$42.50",
"highestPriceAmount" :"$42.50",
"colorCount" : "0",
"isPriceVary" :"false"
}]
</div>
There are different DIVs with different SKU variable productPriceJSON_18678522, productPriceJSON_18678533,productPriceJSON_18678544 and so on.
I want to do 2 things:
Import all the DIVs that contain productPriceJSON_, I tried using
//div[#id=[contains(.,"skuPriceJSON_")]]
But no luck
How can I get the discount price from this DIV matching $42.50?
Really appreciate the help here.
Cheers,
B.
I'm working with progress bar, i add the lib ng-simple-progress-bar to work with it https://www.npmjs.com/package/ng-simple-progress-bar .
this is my code html:
<ng-simple-progress-bar
[percent]="30"
[color]="'#6e587a'"
(percentChange)="onPercentChange($event)"
[height]="'20px'" [backgroundColor]="'#f7f7f7'"
[progressBarType]="'square'"
class="stripes">
</ng-simple-progress-bar>
I obtain this result:
But U want to obtain this result:
Any help, How to do it?
Have you tried this?
<ng-simple-progress-bar [percent]="30" [color]="'#6e587a'"
(percentChange)="onPercentChange($event)"
[height]="'20px'" [backgroundColor]="'#f7f7f7'"
[progressBarType]="'square'"
[striped]="true">
</ng-simple-progress-bar>
I'm having problems with using checkbox with Thymleaf.
My Form has a List of object "AssignFlag" with name "assignFlagList".
List<AssignFlagForm> assignFlagList;
object AssignFlagForm has 3 fields:
String codeValue;
String codeKey;
public boolean isChecked;
I want to create checkboxes for each AssignFlagForm, and post true value for each AssignFlag that is checked on the screen.
my Thymeleaf template:
<span th:each="assignFlag, stat : *{assignFlagList}">
<input type="checkbox" th:field="*{assignFlagList[__${stat.index}__].isChecked}"
th:value="*{'TRUE'}" style="margin-right: 0;" />
<label th:for="${'assignFlagList' + stat.index + '.isChecked1'}" th:text="${assignFlag.codeKey}" style="font-weight: normal;">
</label>
</span>
and I wrote this referring to the official document of Thymeleaf
https://www.thymeleaf.org/doc/tutorials/2.1/thymeleafspring.html#checkbox-fields
It doesn't work and I don't know why.
Error code is
Error during execution of processor org.thymeleaf.spring5.processor.SpringInputCheckboxFieldTagProcessor
but I still can't figure out.
Could somebody please help me?
Thank you in advance.
I have a typeahead that looks like this:
<input type="text" class='tk-proxima-nova degreeIn candidateProfile' placeholder="School / Institution" ng-model="university" typeahead="university.Service_Provider_Name for university in universitySuggest($viewValue)" />
it returns JSON that looks similar to this:
[{"Service_Provider_ID":133368,"Service_Provider_Name":"Duke University","Service_Provider_Desc":null,"NAICS_Id":1809},{"Service_Provider_ID":196282,"Service_Provider_Name":"Duke University Medical Center","Service_Provider_Desc":null,"NAICS_Id":1809},{"Service_Provider_ID":222220,"Service_Provider_Name":"Duke University Psychology Internship","Service_Provider_Desc":null,"NAICS_Id":1809},{"Service_Provider_ID":223427,"Service_Provider_Name":"Duke University Medical Center Psychology Internship","Service_Provider_Desc":null,"NAICS_Id":1809}]
When I select the option from the typeahead it puts the school name in the field as it's supposed to, but is there a way to also set the id to another hidden input so I can send that with my selected data as well. The ID is what is important here, but the name is needed for viewing.
Yes, you can do something like :
<input type="text"
ng-model="selected"
typeahead-on-select="changeSelect($item)"
typeahead="university as university.Service_Provider_Name for university in universities | filter:{Service_Provider_Name:$viewValue} " />
Here is the Plunkr
I've a little indented your code for more clarity.
In addition to the comments Apercu gave above regarding the format of the typeahead="..." ,you need to have a typeahead-input-formatter like this
typeahead-input-formatter="univChosen($model)"
$scope.univChosen = function(theId) {
var theItem = jQuery.grep($scope.universities,function(p) {
return p.Service_Provider_ID == theId});
return theItem[0].Service_Provider_Name;
};
I'm assuming here that $scope.universities contains the complete list of all the items in the typeahead choices. I've used jQuery here to find the matching item but you can just do a for(...) loop if you want. The function returns the string that will actually get displayed, in this case the name.
I have this code and I'm trying to add an id="" or class="" to each of these 2 select.option .... can somebody give me a hand please, I tried different ways and positions but it just doesn't work...
$status []=JHTML::_('select.option','1',JText::_('Yes'),'id','title');
$status []=JHTML::_('select.option','0',JText::_('No'),'id','title');
On site this code looks like
<label for="show_map1">Yes</label>
<label for="show_map0">No</label>
What I'm trying to achieve is:
<label for="show_map1" id="map_yes">Yes</label>
<label for="show_map0" id="map_no">No</label>
Can somebody give me a hand please?
Thank you
Try this,
$manufacturers = array ('Nike','Adi');
$lists['manufacturers'] = JHTML::_('select.genericlist', $manufacturers, 'virtuemart_manufacturer_id', 'class="inputbox"', 'value', 'text', $product->virtuemart_manufacturer_id );
//$manufacturers is the options array
//virtuemart_manufacturer_id is the id and name of the filed
//'class="inputbox"' you can add additional class here
//$product->virtuemart_manufacturer_id is used for set default selection like Nike or Adi here.
echo $lists['manufacturers'];
Hope its help ..