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.
Related
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"
/>
In NativeScript-core I have a series of textfields like on the picture:
The TextField is like:
<TextField text="{{ number }}" hint="" maxLength="1" keyboardType="number"/>
Is it possible to move focus on the previous filed if the user press BackSpace while on empty field?
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 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
How can I configura inputscope number in order to acept spanish decimal numbers? I need change "." by ","
phone regional settins is spanish.
this is my code:
<TextBox x:Name="txtCantdiad" Text="{Binding Cantidad, Mode=TwoWay, ConverterCulture=es-ES, StringFormat=N2}" Grid.Row="1" Grid.Column="1"
Visibility="{Binding UsaUnidades}" KeyUp="Canvas_KeyUp">
<TextBox.InputScope>
<InputScope>
<InputScopeName NameValue="Number"/>
</InputScope>
</TextBox.InputScope>
</TextBox>
Thanks
I think replacing the comma by a dot in code would be the best approach, correct me if i am wrong,
PHP : str_replace(",",".", $_POST['txtCantdiad']);
C# : txtCantdiad.Replace(",", ".");