Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5985679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:33:52+00:00 2026-05-22T22:33:52+00:00

I code (see this jsfiddle ) as follows: <h2>Knockout with jQuery UI Widget Bindings</h2>

  • 0

I code (see this jsfiddle) as follows:

<h2>Knockout with jQuery UI Widget Bindings</h2>

<div>
  <label for='from'>Date From:</label>
  <input id='from' type='text' 
    data-bind='jqueryui: "datepicker",
               value: from' />
  <small>(with datepicker)</small>
</div>

<div>
  <label for='to'>Date To:</label>
  <input id='to' type='text' 
    data-bind='jqueryui: "datepicker",
               value: to' />
  <small>(with datepicker)</small>
</div>

<select id="Range" name="Range" data-bind="value: range, options:ranges, optionsText:'name'">

And this Javascript:

var viewModel = {
    ranges : [
        {name:'Yesterday',value:'Yesterday'}, 
        {name:'Last7Days',value:'Last 7 Days'}, 
        {name:'Last14Days',value:'Last 14 Days'}, 
        {name:'LastFullWeek',value:'Last Full Week'}, 
        {name:'LastFullFortnight',value:'Last Full Fortnight'}, 
        {name:'LastFullThreeWeeks',value:'Last Full Three Weeks'}, 
        {name:'LastMonth',value:'Last Month'}, 
        {name:'MonthToDate',value:'Month To Date'}, 
        {name:'LastQuarter',value:'Last Quarter'}, 
        {name:'Select',value:'Select'}
    ],
    from: ko.observable(''),
    to: ko.observable(''),
    range: ko.observable('')
};
ko.applyBindings(viewModel);

I want to reset the date from and date to when I select a value from the drop down list.
In the same way, if I manually select a value via datepicker, I want to change the dropdownlist to be “Select”

Any idea on how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:33:53+00:00Added an answer on May 22, 2026 at 10:33 pm

    Manual subscriptions are a good option.

    Something like: http://jsfiddle.net/rniemeyer/N58rf/

    Basic idea is like:

    viewModel.range.subscribe(function(newValue) {
        if (newValue && newValue.value !== 'Select') {
            this.from('').to('');
        }
    }, viewModel);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See this fiddle: http://jsfiddle.net/Bg9Zx/5/ Relevant code: <fieldset data-role=controlgroup data-type=horizontal id=locate-me> <input type=checkbox name=loc id=loc
See this code: var jsonString = '{id:714341252076979033,type:FUZZY}'; var jsonParsed = JSON.parse(jsonString); console.log(jsonString, jsonParsed); When
I have this code I'm working on, see link: http://jsfiddle.net/PqsAD/3/ The problem is depending
Please see this: My code looks like this now: http://jsfiddle.net/Bd9Ut/ As you can see
See this code example: http://jsfiddle.net/Z2BMK/ Chrome/IE8 look like this Firefox looks like this My
Please see this fiddle: http://jsfiddle.net/ZWw3Z/5/ My code is: p { position: relative; background-color: blue;
In a webservice I see this code: <WebMethod()> _ Public Function dosomething() As Boolean
i'm playing with MEF and in the example i see this code ( i
Please see this piece of code: #include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int i
I have see code like this Dim s as something = new something Dim

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.