PDA

View Full Version : [CLOSED] DateSlider control



jainanki
Feb 20, 2014, 10:25 PM
Hey there,

I am looking for a date slider control, where I can specify the begin and end date values and the number of steps to be created on the slider control. In addition to which, I want the control to have either 1 or 2 thumbs, which will give me an active date range.

I tried looking at the Examples page, but could not find exactly what I am looking for. I did find a regular slider control, but the values are in numbers (int or double). I want dates.

Do you think you could help me a little here?

Thanks,
ankit

geoffrey.mcgill
Feb 20, 2014, 11:28 PM
I don't think we have any components that include the functionality you requested.

Can you link us to something online that reproduces or demonstrates what you require?

jainanki
Feb 20, 2014, 11:44 PM
Hey Geoffrey,

Thanks for the prompt response.

Here is the control I am looking for:
http://developers.arcgis.com/javascript/samples/renderer_temporal/

Thanks,
ankit

Daniil
Feb 21, 2014, 4:29 AM
Hi,

Well, I would try with a Slider anyway. Yes, there are numbers, but you can treat those numbers as you need.

For example, a Slider has 0 value, it means the start date. A Slider has 10 value it means "the start date + 10 steps". You should associate the step to some amount of time.

jainanki
Feb 24, 2014, 2:13 PM
Thanks Daniil,

I tried with the regular slider control. What I was trying to do was to get the numeric value and add start date to it to get a date value, but I could not link the slider control to a code behind function. Could you direct me towards some resource where I could get an example as to hot to do this.

I have already tried the examples gallery for Ext.Net, may be I missed something.

Thanks,
ankit

Daniil
Feb 24, 2014, 2:40 PM
I don't think we have such an example.


but I could not link the slider control to a code behind function

I don't quite understand what you mean. Here is an example where the Sliders' values (Number) are got in code behind.
http://examples2.ext.net/#/Form/Slider/Overview/

Just

this.Slider1.Number

jainanki
Feb 24, 2014, 3:19 PM
What I meant to ask was that I want to link the Change event of the slider with a code behind function, where I can get the slider value and process it further.

Daniil
Feb 24, 2014, 3:24 PM
It appears to be working for me.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Slider_Change(object sender, DirectEventArgs e)
{
Slider s = sender as Slider;

X.Msg.Alert("Slider_Change", s.Number).Show();
}
</script>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Slider
runat="server"
MinValue="0"
MaxValue="100"
Width="100">
<DirectEvents>
<Change OnEvent="Slider_Change" Buffer="100" />
</DirectEvents>
</ext:Slider>
</form>
</body>
</html>

jainanki
Feb 24, 2014, 7:45 PM
Thanks!! It is working.