I would like to have a timer in XUL which will increment as time passes from a given start and end point (triggered by event listeners)
The UI I have set up is as follows:
<vbox>
<label id="asterisk-ext-caller-id-num" value="XXXXX XXX XXX" />
<label id="asterisk-ext-caller-id-name" value="Blah de blah blah" />
<timepicker id="asterisk-ext-calltimer" readonly="true" disabled="true" is24HourClock="true" value="00:16:24" />
<hbox>
<button id="asterisk-ext-hold-button" label="Hold"
oncommand="AsteriskExtPresence.BrowserOverlay.toggleHold();"/>
<button id="asterisk-ext-hangup-button" label="Hangup"
oncommand="AsteriskExtPresence.BrowserOverlay.hangupMyChannel();"/>
</hbox>
</vbox>
I'd like to increment the asterisk-ext-calltimer element every second to give a count of how long a person has been on the phone for.
I can either start it going (ideal) or query the server for the time every second (not ideal, obvious reasons)
Anyone done this before, or can anyone think how best to get the incrementation on the timepicker?
See Alternating two colors example on MDN
Related
I am working on an application for disabled people in which NVDA screen reader is supposed to read out the current date if the user hit on element(date picker/calendar/cleave) with tab. When Navigating from top to bottom of page NVDA is ignoring aria=current="date" ( doesn't reads out as current date), but reads out the same date when navigating from b0ttom-top of the page.
reference of code snippet:
<tag
attribute1
attribute2
aria-current="date"
>
<input /calendar (could be calendar in place of input)
attribute1
type="date"
aria-current="date"
attribute2
more attributes
>
</tag>
aria-current is supposed to tell you which element within a set of elements is the current one. It has various values with the most common one being "true".
I just tried the various values with NVDA on both Firefox and Chrome and they all seemed to work.
<button>foo</button>
<button aria-current="true">foo</button>
<button aria-current="page">foo</button>
<button aria-current="step">foo</button>
<button aria-current="location">foo</button>
<button aria-current="date">foo</button>
<button aria-current="time">foo</button>
The results from NVDA were:
"foo button"
"foo button, current"
"foo button, current page"
"foo button, current step"
"foo button, current location"
"foo button, current date"
"foo button, current time"
In indicator View there is only one line to show indicators how I can wrap to next line if indicator count is more?
<IndicatorView x:Name="indicatorView"
IndicatorsShape="Circle"
IndicatorColor="LightGray"
SelectedIndicatorColor="DarkGray"
HorizontalOptions="Center"
Margin="40,100,0,40"
MinimumHeightRequest="100"
/>
I could not solve the below question for Nativescript, and have google search, and try many different ways.
<lv:RadListView items="{{ data }}" >
<lv:RadListView.itemTemplate>
<StackLayout>
<TextField text="{{ data1 }}" />
<TextField text="{{ data2 }}" />
</StackLayout>
</lv:RadListView.itemTemplate>
</lv:RadListView>
Question
If the user key in the above 10 different index TextFields of data1 and data2 in the itemTemplate,
how to get the 10 different index TextFields of data1 and data2 ?
Appreciate anyone who could help to solve the above question. Thank you.
As far as I understood your question you need to know the which item is tapped/ selected based on the index and this way have access to the specific bound values.
If that is the case you can use ListViewEventData and access the unique item index for each tapped or selected item. Basic example demonstrating using the index to apply different styles can be found here - based on this approach you can access the index of the tapped item on itemTap event
I'm using uib-datepicker-popup fairly heavily in my application. It has worked perfectly until this specific instance.
I am using it exactly the same as I have in every other instance of my application, but it only half works.
The "Today", "Clear" and "Done" buttons in the bottom bar work as expected (hitting "today" puts the date in the input and hides the calendar, "clear" clears the input and hides the calendar, "done" hides the calendar).
However, when I select any date/day on the calendar it highlights it, but the date does not populate in the input and the calendar remains open.
Here's my html:
<input type="text" class="form-control" name="convert_date" uib-datepicker-popup="M/d/yyyy" ng-model="vm.case.convert_date" ng-disabled="!vm.isActive" placeholder="m/d/yyyy" is-open="open" ng-click="open = true" ng-focus="open = true" show-weeks="false">
Any ideas why the date buttons won't populate the input?
ngModelOptions was the culprit here. I had it set for the entire view in this area of my application as follows:
ng-model-options="{ updateOn: 'blur click', debounce: {'blur': 0, 'click': 0} }"
This prevented the day/date buttons from being able to fire their events and populate the input and hide the calendar.
I resolved my problem by adding another instance of ngModelOptions directly as an attribute to my uib-datepicker-popup element like so:
<input ng-model-options="{ updateOn: 'default' }" name="convert_date" uib-datepicker-popup="M/d/yyyy" type="text" class="form-control" ng-model="vm.case.convert_date" ng-disabled="!vm.isActive" placeholder="m/d/yyyy" is-open="open" ng-click="open = true" ng-focus="open = true" show-weeks="false">
This reset the model behavior to the default settings, so that the datepicker could function properly again.
I want to change my date picker format in windows phone 7. I have changed it to {0:dd-MM-yyyy}
but I still get both date and time in the string and also the preceding zeroes are omitted.
like if I want a date like 03-11-1988 all I get is 3/11/1988 00:00 AM.
how do I correct this ?
this is my xaml
<toolkit:DatePicker Margin="261,463,0,0" x:Name="datePicker1" HorizontalAlignment="Left" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" ValueStringFormat="{}{0:dd-MM-yyyy}" />
<toolkit:DatePicker HorizontalAlignment="Left" Margin="261,558,0,0" x:Name="datePicker2" Height="77" VerticalAlignment="Top" ValueStringFormat="{}{0:dd-MM-yyyy}" />
<toolkit:DatePicker HorizontalAlignment="Left" Margin="261,648,0,0" x:Name="datePicker3" VerticalAlignment="Top" ValueStringFormat="{}{0:dd-MM-yyyy}" />
I am talking about the value property.
The display in the selector is correct.The value property is returning string in the form like 3/12/2011 00:00 AM. although
String txtDate = Convert.ToString(txtDated.ToShortDateString());
removes 00:00AM but the date is still 3/12/2011 format and i want 03-12-2011 for which i think the only solution is replacing / with - in the string.